mirror of
https://github.com/python/cpython.git
synced 2025-08-19 00:00:48 +00:00
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. ........
This commit is contained in:
parent
cc436eb6e8
commit
1d55ec329a
20 changed files with 98 additions and 149 deletions
|
@ -44,9 +44,8 @@ def find_block(block, name):
|
|||
|
||||
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")
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue