summaryrefslogtreecommitdiffstats
path: root/Lib/test/test_code.py
diff options
context:
space:
mode:
Diffstat (limited to 'Lib/test/test_code.py')
-rw-r--r--Lib/test/test_code.py7
1 files changed, 7 insertions, 0 deletions
diff --git a/Lib/test/test_code.py b/Lib/test/test_code.py
index 0cd1fb3..7543c9a 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