

def test_namespaces(self):
    self.assertTrue(self.top.lookup('Mine').is_namespace())
    self.assertTrue(self.Mine.lookup('a_method').is_namespace())
    self.assertTrue(self.top.lookup('spam').is_namespace())
    self.assertTrue(self.spam.lookup('internal').is_namespace())
    self.assertTrue(self.top.lookup('namespace_test').is_namespace())
    self.assertFalse(self.spam.lookup('x').is_namespace())
    self.assertTrue((self.top.lookup('spam').get_namespace() is self.spam))
    ns_test = ns_test.top.lookup('namespace_test')
    self.assertEqual(len(ns_test.get_namespaces()), 2)
    self.assertRaises(ValueError, ns_test.get_namespace)

dataset/ETHPy150Open amrdraz/kodr/app/brython/www/src/Lib/test/test_symtable.py SymtableTest.test_namespaces/VarMisuse@144/182 `self`->`ns_test`