diff options
Diffstat (limited to 'Lib/test/test_code.py')
| -rw-r--r-- | Lib/test/test_code.py | 7 | 
1 files changed, 7 insertions, 0 deletions
diff --git a/Lib/test/test_code.py b/Lib/test/test_code.py index 0cd1fb3f97..7543c9ab34 100644 --- a/Lib/test/test_code.py +++ b/Lib/test/test_code.py @@ -338,6 +338,13 @@ class CodeTest(unittest.TestCase):          new_code = code = func.__code__.replace(co_linetable=b'')          self.assertEqual(list(new_code.co_lines()), []) +    def test_co_lnotab_is_deprecated(self):  # TODO: remove in 3.14 +        def func(): +            pass + +        with self.assertWarns(DeprecationWarning): +            func.__code__.co_lnotab +      def test_invalid_bytecode(self):          def foo():              pass  | 
