summaryrefslogtreecommitdiffstats
path: root/Lib/test/test_py3kwarn.py
diff options
context:
space:
mode:
authorSerhiy Storchaka <storchaka@gmail.com>2014-06-01 19:13:39 (GMT)
committerSerhiy Storchaka <storchaka@gmail.com>2014-06-01 19:13:39 (GMT)
commit79fa98af9e3a37ee1e98094c55d8574c20c9d9a5 (patch)
tree547b06ab2d3585fb3f8568ff993b6e4637cb36d4 /Lib/test/test_py3kwarn.py
parente75a555073abc75e4eb1db923a1929d3b500e5e5 (diff)
downloadcpython-79fa98af9e3a37ee1e98094c55d8574c20c9d9a5.zip
cpython-79fa98af9e3a37ee1e98094c55d8574c20c9d9a5.tar.gz
cpython-79fa98af9e3a37ee1e98094c55d8574c20c9d9a5.tar.bz2
Issue #19656: Running Python with the -3 option now also warns about
non-ascii bytes literals.
Diffstat (limited to 'Lib/test/test_py3kwarn.py')
-rw-r--r--Lib/test/test_py3kwarn.py5
1 files changed, 5 insertions, 0 deletions
diff --git a/Lib/test/test_py3kwarn.py b/Lib/test/test_py3kwarn.py
index 2afd8a1..5aee6a5 100644
--- a/Lib/test/test_py3kwarn.py
+++ b/Lib/test/test_py3kwarn.py
@@ -307,6 +307,11 @@ class TestPy3KWarnings(unittest.TestCase):
w.reset()
self.assertWarning(sequenceIncludes(range(3), 2), w, seq_warn)
+ def test_nonascii_bytes_literals(self):
+ expected = "non-ascii bytes literals not supported in 3.x"
+ with check_py3k_warnings((expected, SyntaxWarning)):
+ exec "b'\xbd'"
+
class TestStdlibRemovals(unittest.TestCase):