From febc3320563bf597e186ebce75abdac2926ceeb6 Mon Sep 17 00:00:00 2001 From: Serhiy Storchaka Date: Sat, 6 Aug 2016 23:29:29 +0300 Subject: Issue #26754: Undocumented support of general bytes-like objects as path in compile() and similar functions is now deprecated. --- Lib/test/test_symtable.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'Lib/test/test_symtable.py') 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") -- cgit v1.2.3