@@ -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;
@@ -162,7 +163,7 @@ mod tests {
162163 #[ test]
163164 fn test_find_bridge_pyo3 ( ) {
164165 let pyo3_mixed = MetadataCommand :: new ( )
165- . manifest_path ( Path :: new ( "test-crates/ pyo3-mixed") . join ( "Cargo.toml" ) )
166+ . manifest_path ( test_crate_path ( " pyo3-mixed") . join ( "Cargo.toml" ) )
166167 . exec ( )
167168 . unwrap ( ) ;
168169
@@ -181,7 +182,7 @@ mod tests {
181182 use crate :: bridge:: { PyO3Metadata , PyO3VersionMetadata } ;
182183
183184 let pyo3_pure = MetadataCommand :: new ( )
184- . manifest_path ( Path :: new ( "test-crates/ pyo3-pure") . join ( "Cargo.toml" ) )
185+ . manifest_path ( test_crate_path ( " pyo3-pure") . join ( "Cargo.toml" ) )
185186 . exec ( )
186187 . unwrap ( ) ;
187188
@@ -207,14 +208,14 @@ mod tests {
207208 #[ test]
208209 fn test_find_bridge_pyo3_feature ( ) {
209210 let pyo3_pure = MetadataCommand :: new ( )
210- . manifest_path ( Path :: new ( "test-crates/ pyo3-feature") . join ( "Cargo.toml" ) )
211+ . manifest_path ( test_crate_path ( " pyo3-feature") . join ( "Cargo.toml" ) )
211212 . exec ( )
212213 . unwrap ( ) ;
213214
214215 assert ! ( find_bridge( & pyo3_pure, None , None ) . is_err( ) ) ;
215216
216217 let pyo3_pure = MetadataCommand :: new ( )
217- . manifest_path ( Path :: new ( "test-crates/ pyo3-feature") . join ( "Cargo.toml" ) )
218+ . manifest_path ( test_crate_path ( " pyo3-feature") . join ( "Cargo.toml" ) )
218219 . other_options ( vec ! [ "--features=pyo3" . to_string( ) ] )
219220 . exec ( )
220221 . unwrap ( ) ;
@@ -228,7 +229,7 @@ mod tests {
228229 #[ test]
229230 fn test_find_bridge_cffi ( ) {
230231 let cffi_pure = MetadataCommand :: new ( )
231- . manifest_path ( Path :: new ( "test-crates/ cffi-pure") . join ( "Cargo.toml" ) )
232+ . manifest_path ( test_crate_path ( " cffi-pure") . join ( "Cargo.toml" ) )
232233 . exec ( )
233234 . unwrap ( ) ;
234235
@@ -247,7 +248,7 @@ mod tests {
247248 #[ test]
248249 fn test_find_bridge_bin ( ) {
249250 let hello_world = MetadataCommand :: new ( )
250- . manifest_path ( Path :: new ( "test-crates/ hello-world") . join ( "Cargo.toml" ) )
251+ . manifest_path ( test_crate_path ( " hello-world") . join ( "Cargo.toml" ) )
251252 . exec ( )
252253 . unwrap ( ) ;
253254
@@ -263,7 +264,7 @@ mod tests {
263264 assert ! ( find_bridge( & hello_world, Some ( "pyo3" ) , None ) . is_err( ) ) ;
264265
265266 let pyo3_bin = MetadataCommand :: new ( )
266- . manifest_path ( Path :: new ( "test-crates/ pyo3-bin") . join ( "Cargo.toml" ) )
267+ . manifest_path ( test_crate_path ( " pyo3-bin") . join ( "Cargo.toml" ) )
267268 . exec ( )
268269 . unwrap ( ) ;
269270 assert ! ( matches!(
0 commit comments