diff --git a/tests/test_compilation.py b/tests/test_compilation.py index dc67b2b..90fbf40 100644 --- a/tests/test_compilation.py +++ b/tests/test_compilation.py @@ -3,15 +3,15 @@ def test_if_compiled(): """Test whether C-extensions are succesfully ran, if enabled.""" - from constraint import check_if_compiled + import constraint # check if the .so files are commented - dir = Path("./constraint") + dir = Path(constraint.__file__).resolve().parent assert dir.exists() files = list(dir.glob("_*.so")) # check if the code uses C-extensions if len(files) > 0: - assert check_if_compiled() is False + assert constraint.check_if_compiled() is False else: - assert check_if_compiled() + assert constraint.check_if_compiled()