@@ -153,6 +153,7 @@ mod tests {
153153 use super :: * ;
154154 use crate :: bridge:: { Abi3Version , PyO3 , PyO3Crate , find_bridge} ;
155155 use crate :: python_interpreter:: InterpreterResolver ;
156+ use crate :: test_utils:: test_crate_path;
156157 use crate :: { BridgeModel , Target } ;
157158 use cargo_metadata:: MetadataCommand ;
158159 use insta:: assert_snapshot;
@@ -161,7 +162,7 @@ mod tests {
161162 #[ test]
162163 fn test_find_bridge_pyo3 ( ) {
163164 let pyo3_mixed = MetadataCommand :: new ( )
164- . manifest_path ( Path :: new ( "test-crates/ pyo3-mixed") . join ( "Cargo.toml" ) )
165+ . manifest_path ( test_crate_path ( " pyo3-mixed") . join ( "Cargo.toml" ) )
165166 . exec ( )
166167 . unwrap ( ) ;
167168
@@ -180,7 +181,7 @@ mod tests {
180181 use crate :: bridge:: { PyO3Metadata , PyO3VersionMetadata } ;
181182
182183 let pyo3_pure = MetadataCommand :: new ( )
183- . manifest_path ( Path :: new ( "test-crates/ pyo3-pure") . join ( "Cargo.toml" ) )
184+ . manifest_path ( test_crate_path ( " pyo3-pure") . join ( "Cargo.toml" ) )
184185 . exec ( )
185186 . unwrap ( ) ;
186187
@@ -206,14 +207,14 @@ mod tests {
206207 #[ test]
207208 fn test_find_bridge_pyo3_feature ( ) {
208209 let pyo3_pure = MetadataCommand :: new ( )
209- . manifest_path ( Path :: new ( "test-crates/ pyo3-feature") . join ( "Cargo.toml" ) )
210+ . manifest_path ( test_crate_path ( " pyo3-feature") . join ( "Cargo.toml" ) )
210211 . exec ( )
211212 . unwrap ( ) ;
212213
213214 assert ! ( find_bridge( & pyo3_pure, None , None ) . is_err( ) ) ;
214215
215216 let pyo3_pure = MetadataCommand :: new ( )
216- . manifest_path ( Path :: new ( "test-crates/ pyo3-feature") . join ( "Cargo.toml" ) )
217+ . manifest_path ( test_crate_path ( " pyo3-feature") . join ( "Cargo.toml" ) )
217218 . other_options ( vec ! [ "--features=pyo3" . to_string( ) ] )
218219 . exec ( )
219220 . unwrap ( ) ;
@@ -227,7 +228,7 @@ mod tests {
227228 #[ test]
228229 fn test_find_bridge_cffi ( ) {
229230 let cffi_pure = MetadataCommand :: new ( )
230- . manifest_path ( Path :: new ( "test-crates/ cffi-pure") . join ( "Cargo.toml" ) )
231+ . manifest_path ( test_crate_path ( " cffi-pure") . join ( "Cargo.toml" ) )
231232 . exec ( )
232233 . unwrap ( ) ;
233234
@@ -246,7 +247,7 @@ mod tests {
246247 #[ test]
247248 fn test_find_bridge_bin ( ) {
248249 let hello_world = MetadataCommand :: new ( )
249- . manifest_path ( Path :: new ( "test-crates/ hello-world") . join ( "Cargo.toml" ) )
250+ . manifest_path ( test_crate_path ( " hello-world") . join ( "Cargo.toml" ) )
250251 . exec ( )
251252 . unwrap ( ) ;
252253
@@ -262,7 +263,7 @@ mod tests {
262263 assert ! ( find_bridge( & hello_world, Some ( "pyo3" ) , None ) . is_err( ) ) ;
263264
264265 let pyo3_bin = MetadataCommand :: new ( )
265- . manifest_path ( Path :: new ( "test-crates/ pyo3-bin") . join ( "Cargo.toml" ) )
266+ . manifest_path ( test_crate_path ( " pyo3-bin") . join ( "Cargo.toml" ) )
266267 . exec ( )
267268 . unwrap ( ) ;
268269 assert ! ( matches!(
0 commit comments