Exemplo n.º 1
0
 def test_values_with_start(self):
     start = 42
     A = k.make("A", "abcd", start=start)
     self.assertEquals(A.a, start)
     self.assertEquals(A.d, start + 3)
Exemplo n.º 2
0
 def test_type_name(self):
     A = k.make("Foobar", "X")
     self.assertEquals(str(type(A.X)), "<class 'k.Foobar'>")
Exemplo n.º 3
0
 def test_values(self):
     A = k.make("A", "xyz")
     self.assertEquals(A.x, 0)
     self.assertEquals(A.y, 1)
     self.assertEquals(A.z, 2)
Exemplo n.º 4
0
 def test_type(self):
     x = k.make("x", "a")
     self.assertIsInstance(x.a, x)
     self.assertIsInstance(x.a, int)