Skip to content

Commit

Permalink
Only run pyo3_no_extension_module test with CPython
Browse files Browse the repository at this point in the history
  • Loading branch information
messense committed Oct 31, 2022
1 parent f942f60 commit 6ba568b
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion tests/run.rs
Original file line number Diff line number Diff line change
Expand Up @@ -349,7 +349,14 @@ fn abi3_without_version() {
#[test]
#[cfg(all(target_os = "linux", target_env = "gnu"))]
fn pyo3_no_extension_module() {
handle_result(errors::pyo3_no_extension_module())
let python = test_python_path().map(PathBuf::from).unwrap_or_else(|| {
let target = Target::from_target_triple(None).unwrap();
target.get_python()
});
let python_implementation = get_python_implementation(&python).unwrap();
if python_implementation == "cpython" {
handle_result(errors::pyo3_no_extension_module())
}
}

#[test]
Expand Down

0 comments on commit 6ba568b

Please sign in to comment.