Mercurial > cpython-lru_cache-weakref
diff Lib/test/test_symtable.py @ 63634:762d89faceaa 2.6
Merged revisions 79539 via svnmerge from
svn+ssh://pythondev@svn.python.org/python/trunk
........
r79539 | florent.xicluna | 2010-04-01 01:01:03 +0300 (Thu, 01 Apr 2010) | 2 lines
Replace catch_warnings with check_warnings when it makes sense. Use assertRaises context manager to simplify some tests.
........
| author | Ezio Melotti <ezio.melotti@gmail.com> |
|---|---|
| date | Mon, 02 Aug 2010 23:34:49 +0000 |
| parents | 6910792fcd4b |
| children | 6b7704fe1be1 b36cb4602e21 |
line wrap: on
line diff
--- a/Lib/test/test_symtable.py Mon Aug 02 22:01:34 2010 +0000 +++ b/Lib/test/test_symtable.py Mon Aug 02 23:34:49 2010 +0000 @@ -44,9 +44,8 @@ class SymtableTest(unittest.TestCase): - with warnings.catch_warnings(): - # Ignore warnings about "from blank import *" - warnings.simplefilter("ignore", SyntaxWarning) + with test_support.check_warnings( + ("import \* only allowed at module level", SyntaxWarning)): top = symtable.symtable(TEST_CODE, "?", "exec") # These correspond to scopes in TEST_CODE Mine = find_block(top, "Mine")
