From 3c70338e9f1766e409ba93af797c4ee8111bc1da Mon Sep 17 00:00:00 2001 From: messense Date: Mon, 31 Oct 2022 15:25:28 +0800 Subject: [PATCH] Only run pyo3_no_extension_module test with CPython --- tests/run.rs | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/tests/run.rs b/tests/run.rs index b5eaf75d5..1be545377 100644 --- a/tests/run.rs +++ b/tests/run.rs @@ -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]