summaryrefslogtreecommitdiffstats
path: root/Lib/test
diff options
context:
space:
mode:
authorBenjamin Peterson <benjamin@python.org>2008-06-08 02:05:33 (GMT)
committerBenjamin Peterson <benjamin@python.org>2008-06-08 02:05:33 (GMT)
commit2fe3ef8750e7f06ebf250bb2264f71d5f96e2f9b (patch)
tree98de05d124b4a128c7e43677f2b71019819a63d0 /Lib/test
parent1f1174edf363609d501f2677f43bfbdbabb081e5 (diff)
downloadcpython-2fe3ef8750e7f06ebf250bb2264f71d5f96e2f9b.zip
cpython-2fe3ef8750e7f06ebf250bb2264f71d5f96e2f9b.tar.gz
cpython-2fe3ef8750e7f06ebf250bb2264f71d5f96e2f9b.tar.bz2
change Py3k backquote warning to a SyntaxWarning and add a test
Diffstat (limited to 'Lib/test')
-rw-r--r--Lib/test/test_py3kwarn.py6
1 files changed, 6 insertions, 0 deletions
diff --git a/Lib/test/test_py3kwarn.py b/Lib/test/test_py3kwarn.py
index 664df44..617d996 100644
--- a/Lib/test/test_py3kwarn.py
+++ b/Lib/test/test_py3kwarn.py
@@ -10,6 +10,12 @@ if not sys.py3kwarning:
class TestPy3KWarnings(unittest.TestCase):
+ def test_backquote(self):
+ expected = 'backquote not supported in 3.x; use repr()'
+ with catch_warning() as w:
+ exec "`2`" in {}
+ self.assertWarning(None, w, expected)
+
def test_type_inequality_comparisons(self):
expected = 'type inequality comparisons not supported in 3.x'
with catch_warning() as w: