Author: Armin Rigo <[email protected]>
Branch:
Changeset: r98575:76b34bb85fe5
Date: 2020-01-23 13:07 +0100
http://bitbucket.org/pypy/pypy/changeset/76b34bb85fe5/
Log: Test really just what we want to, i.e. that the message does not
contain the word 'self'
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
@@ -762,9 +762,9 @@
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
- # in particular it must not end with ' Did you forget 'self' in the
function definition?'
- assert str(exc.value).endswith("takes exactly 2 arguments (3 given)")
+ # does not contain the warning
+ # 'Did you forget 'self' in the function definition?'
+ assert 'self' not in str(exc.value)
@pytest.mark.pypy_only
def test_error_message_bound_method(self):
_______________________________________________
pypy-commit mailing list
[email protected]
https://mail.python.org/mailman/listinfo/pypy-commit