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:
case BACKQUOTE: { /* repr */
expr_ty expression;
if (Py_Py3kWarningFlag) {
- if (PyErr_WarnExplicit(PyExc_DeprecationWarning,
+ if (PyErr_WarnExplicit(PyExc_SyntaxWarning,
"backquote not supported in 3.x; use repr()",
c->c_filename, LINENO(n),
NULL, NULL)) {