mirror of
https://github.com/python/cpython.git
synced 2025-08-04 08:59:19 +00:00
bpo-42355: symtable.get_namespace() now checks whether there are multiple or any namespaces found (GH-23278)
This commit is contained in:
parent
8f50f44592
commit
a045991f60
3 changed files with 13 additions and 5 deletions
|
@ -159,6 +159,10 @@ class SymtableTest(unittest.TestCase):
|
|||
self.assertEqual(len(ns_test.get_namespaces()), 2)
|
||||
self.assertRaises(ValueError, ns_test.get_namespace)
|
||||
|
||||
ns_test_2 = self.top.lookup("glob")
|
||||
self.assertEqual(len(ns_test_2.get_namespaces()), 0)
|
||||
self.assertRaises(ValueError, ns_test_2.get_namespace)
|
||||
|
||||
def test_assigned(self):
|
||||
self.assertTrue(self.spam.lookup("x").is_assigned())
|
||||
self.assertTrue(self.spam.lookup("bar").is_assigned())
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue