Add a test for get_id() (GH-21370)

This commit is contained in:
Joannah Nanjekye 2020-07-07 21:45:45 -03:00 committed by GitHub
parent 10772ec150
commit 6f13adf59e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 7 additions and 0 deletions

View File

@ -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())