mirror of
https://github.com/python/cpython.git
synced 2025-07-30 14:44:10 +00:00
change Py3k backquote warning to a SyntaxWarning and add a test
This commit is contained in:
parent
1f1174edf3
commit
2fe3ef8750
2 changed files with 7 additions and 1 deletions
|
@ -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:
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue