From 6f13adf59e6feb736d05ebe174bd793f4437a3d8 Mon Sep 17 00:00:00 2001 From: Joannah Nanjekye <33177550+nanjekyejoannah@users.noreply.github.com> Date: Tue, 7 Jul 2020 21:45:45 -0300 Subject: [PATCH] Add a test for get_id() (GH-21370) --- Lib/test/test_symtable.py | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/Lib/test/test_symtable.py b/Lib/test/test_symtable.py index d19355888e4..fa514917a1f 100644 --- a/Lib/test/test_symtable.py +++ b/Lib/test/test_symtable.py @@ -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())