mirror of
https://github.com/python/cpython.git
synced 2025-08-31 14:07:50 +00:00
Add a test for get_id() (GH-21370)
This commit is contained in:
parent
10772ec150
commit
6f13adf59e
1 changed files with 7 additions and 0 deletions
|
@ -63,6 +63,13 @@ class SymtableTest(unittest.TestCase):
|
|||
self.assertEqual(self.spam.get_type(), "function")
|
||||
self.assertEqual(self.internal.get_type(), "function")
|
||||
|
||||
def test_id(self):
|
||||
self.assertGreater(self.top.get_id(), 0)
|
||||
self.assertGreater(self.Mine.get_id(), 0)
|
||||
self.assertGreater(self.a_method.get_id(), 0)
|
||||
self.assertGreater(self.spam.get_id(), 0)
|
||||
self.assertGreater(self.internal.get_id(), 0)
|
||||
|
||||
def test_optimized(self):
|
||||
self.assertFalse(self.top.is_optimized())
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue