summaryrefslogtreecommitdiffstats
path: root/Lib/test/test_symtable.py
diff options
context:
space:
mode:
authorVictor Stinner <vstinner@python.org>2022-10-18 15:52:31 (GMT)
committerGitHub <noreply@github.com>2022-10-18 15:52:31 (GMT)
commitdb03c8066a6b12fa23618f9add0eb795936726b4 (patch)
tree71d35cac37736188bbe8b046aab657b0892be1de /Lib/test/test_symtable.py
parent9da5215000920870eeddd78af92da4c98099706c (diff)
downloadcpython-db03c8066a6b12fa23618f9add0eb795936726b4.zip
cpython-db03c8066a6b12fa23618f9add0eb795936726b4.tar.gz
cpython-db03c8066a6b12fa23618f9add0eb795936726b4.tar.bz2
gh-98393: os module reject bytes-like, only accept bytes (#98394)
The os module and the PyUnicode_FSDecoder() function no longer accept bytes-like paths, like bytearray and memoryview types: only the exact bytes type is accepted for bytes strings.
Diffstat (limited to 'Lib/test/test_symtable.py')
-rw-r--r--Lib/test/test_symtable.py5
1 files changed, 2 insertions, 3 deletions
diff --git a/Lib/test/test_symtable.py b/Lib/test/test_symtable.py
index 819354e..25714ae 100644
--- a/Lib/test/test_symtable.py
+++ b/Lib/test/test_symtable.py
@@ -222,10 +222,9 @@ class SymtableTest(unittest.TestCase):
checkfilename("def f(x): foo)(", 14) # parse-time
checkfilename("def f(x): global x", 11) # symtable-build-time
symtable.symtable("pass", b"spam", "exec")
- with self.assertWarns(DeprecationWarning), \
- self.assertRaises(TypeError):
+ with self.assertRaises(TypeError):
symtable.symtable("pass", bytearray(b"spam"), "exec")
- with self.assertWarns(DeprecationWarning):
+ with self.assertRaises(TypeError):
symtable.symtable("pass", memoryview(b"spam"), "exec")
with self.assertRaises(TypeError):
symtable.symtable("pass", list(b"spam"), "exec")