Author: Matti Picus <matti.pi...@gmail.com>
Branch: 
Changeset: r98567:efe314c692e9
Date: 2020-01-22 16:47 +1100
http://bitbucket.org/pypy/pypy/changeset/efe314c692e9/

Log:    test interesting part of error message, not the op name

diff --git a/pypy/interpreter/test/test_argument.py 
b/pypy/interpreter/test/test_argument.py
--- a/pypy/interpreter/test/test_argument.py
+++ b/pypy/interpreter/test/test_argument.py
@@ -759,12 +759,11 @@
         # does not contain the warning about missing self
         assert exc.value.message == "f0() takes no arguments (1 given)"
 
-    @pytest.mark.pypy_only
     def test_error_message_module_function(self):
         import operator # use repeat because it's defined at applevel
         exc = raises(TypeError, lambda : operator.repeat(1, 2, 3))
         # does not contain the warning about missing self
-        assert exc.value.message == "repeat() takes exactly 2 arguments (3 
given)"
+        assert "takes exactly 2 arguments (3 given)" in str(exc.value)
 
     @pytest.mark.pypy_only
     def test_error_message_bound_method(self):
_______________________________________________
pypy-commit mailing list
pypy-commit@python.org
https://mail.python.org/mailman/listinfo/pypy-commit

Reply via email to