STINNER Victor <vstin...@python.org> added the comment:

This change introduced a regression:
https://buildbot.python.org/all/#/builders/96/builds/1012

$ ./python -m test test___all__
0:00:00 load avg: 0.28 Run tests sequentially
0:00:00 load avg: 0.28 [1/1] test___all__
test test___all__ failed -- Traceback (most recent call last):
  File "/home/vstinner/python/master/Lib/test/test___all__.py", line 104, in 
test_all
    self.check_all(modname)
  File "/home/vstinner/python/master/Lib/test/test___all__.py", line 25, in 
check_all
    exec("import %s" % modname, names)
  File "/home/vstinner/python/master/Lib/contextlib.py", line 140, in __exit__
    next(self.gen)
  File "/home/vstinner/python/master/Lib/test/support/warnings_helper.py", line 
177, in _filterwarnings
    raise AssertionError("unhandled warning %s" % reraise[0])
AssertionError: unhandled warning {message : SyntaxWarning('assertion is always 
true, perhaps remove parentheses?'), category : 'SyntaxWarning', filename : 
'/home/vstinner/python/master/Lib/test/test_typing.py', lineno : 2275, line : 
None}

test___all__ failed

== Tests result: FAILURE ==

1 test failed:
    test___all__

Total duration: 2.7 sec
Tests result: FAILURE


It comes from the following line of test_bad_module() in Lib/test/test_typing:

    assert(get_type_hints(BadModule), {})

assert should be used as "assert test" or "assert test, expr". assert (expr, 
expr) tests if the tuple (2 items) is true, and it's always true.

----------
nosy: +vstinner

_______________________________________
Python tracker <rep...@bugs.python.org>
<https://bugs.python.org/issue41515>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to