summaryrefslogtreecommitdiffstats
path: root/Lib/test/test_symtable.py
diff options
context:
space:
mode:
authorSerhiy Storchaka <storchaka@gmail.com>2016-08-06 20:29:29 (GMT)
committerSerhiy Storchaka <storchaka@gmail.com>2016-08-06 20:29:29 (GMT)
commitfebc3320563bf597e186ebce75abdac2926ceeb6 (patch)
tree1360725b7e65af72348ed78687257249ccf1d36e /Lib/test/test_symtable.py
parentd73c31899e88aa5a1cc28f288cc70a35f2a196c2 (diff)
downloadcpython-febc3320563bf597e186ebce75abdac2926ceeb6.zip
cpython-febc3320563bf597e186ebce75abdac2926ceeb6.tar.gz
cpython-febc3320563bf597e186ebce75abdac2926ceeb6.tar.bz2
Issue #26754: Undocumented support of general bytes-like objects
as path in compile() and similar functions is now deprecated.
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 c5d7fac..bf99505 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")