Lines Matching full:foo
12 foo = ModuleType.__new__(ModuleType)
13 self.assertTrue(foo.__dict__ is None)
14 self.assertRaises(SystemError, dir, foo)
16 s = foo.__name__
20 self.assertEqual(foo.__doc__, ModuleType.__doc__)
24 foo = ModuleType("foo")
25 self.assertEqual(foo.__name__, "foo")
26 self.assertEqual(foo.__doc__, None)
27 self.assertEqual(foo.__dict__, {"__name__": "foo", "__doc__": None})
31 foo = ModuleType("foo", "foodoc")
32 self.assertEqual(foo.__name__, "foo")
33 self.assertEqual(foo.__doc__, "foodoc")
34 self.assertEqual(foo.__dict__,
35 {"__name__": "foo", "__doc__": "foodoc"})
39 foo = ModuleType("foo", u"foodoc\u1234")
40 self.assertEqual(foo.__name__, "foo")
41 self.assertEqual(foo.__doc__, u"foodoc\u1234")
42 self.assertEqual(foo.__dict__,
43 {"__name__": "foo", "__doc__": u"foodoc\u1234"})
47 foo = ModuleType("foo", u"foodoc\u1234")
48 foo.bar = 42
49 d = foo.__dict__
50 foo.__init__("foo", "foodoc")
51 self.assertEqual(foo.__name__, "foo")
52 self.assertEqual(foo.__doc__, "foodoc")
53 self.assertEqual(foo.bar, 42)
54 self.assertEqual(foo.__dict__,
55 {"__name__": "foo", "__doc__": "foodoc", "bar": 42})
56 self.assertTrue(foo.__dict__ is d)
62 foo = ModuleType("foo")
63 foo.bar = 4
64 return foo
70 m = ModuleType("foo")