aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/Lib/test/test_symtable.py
diff options
context:
space:
mode:
Diffstat (limited to 'Lib/test/test_symtable.py')
-rw-r--r--Lib/test/test_symtable.py6
1 files changed, 4 insertions, 2 deletions
diff --git a/Lib/test/test_symtable.py b/Lib/test/test_symtable.py
index c5d7facfdbd..bf995056234 100644
--- a/Lib/test/test_symtable.py
+++ b/Lib/test/test_symtable.py
@@ -158,9 +158,11 @@ class SymtableTest(unittest.TestCase):
checkfilename("def f(x): foo)(") # parse-time
checkfilename("def f(x): global x") # symtable-build-time
symtable.symtable("pass", b"spam", "exec")
- with self.assertRaises(TypeError):
+ with self.assertWarns(DeprecationWarning), \
+ self.assertRaises(TypeError):
symtable.symtable("pass", bytearray(b"spam"), "exec")
- symtable.symtable("pass", memoryview(b"spam"), "exec")
+ with self.assertWarns(DeprecationWarning):
+ symtable.symtable("pass", memoryview(b"spam"), "exec")
with self.assertRaises(TypeError):
symtable.symtable("pass", list(b"spam"), "exec")