Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Tests fail on pypy #157

Closed
zougloub opened this issue Feb 17, 2023 · 0 comments · Fixed by #158
Closed

Tests fail on pypy #157

zougloub opened this issue Feb 17, 2023 · 0 comments · Fixed by #158

Comments

@zougloub
Copy link
Contributor

test_expression.py relies on excinfo.exconly() which is different on PyPy.
I haven't looked whether this is a PyPy bug or not, but the test can be modified as follows, so it passes:

diff --git a/py/tests/test_expression.py b/py/tests/test_expression.py
index 671dd7f..6b5d8e5 100644
--- a/py/tests/test_expression.py
+++ b/py/tests/test_expression.py
@@ -8,6 +8,7 @@
 import gc
 import math
 import operator
+import sys
 from typing import Tuple
 
 import pytest
@@ -264,4 +265,7 @@ def test_expression_rich_compare_operations(op, symbol) -> None:
     else:
         with pytest.raises(TypeError) as excinfo:
             op(e1, e2)
-        assert "kiwisolver.Expression" in excinfo.exconly()
+        if "PyPy" in sys.version:
+            assert "Expression" in excinfo.exconly()
+        else:
+            assert "kiwisolver.Expression" in excinfo.exconly()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant