Exemple #1
0
 def test_returns_list(self):
     self.assertListEqual(prepare(1), [1])
     self.assertListEqual(prepare([1]), [1])
     self.assertListEqual(prepare((1, )), [1])
     self.assertEqual(prepare(None), ())
Exemple #2
0
 def test_evalutes_qualnames(self):
     self.assertEqual(prepare(qualname(MyAnnotation))[0]().foo, 65)
     self.assertEqual(prepare([qualname(MyAnnotation)])[0]().foo, 65)
 def test_evalutes_qualnames(self):
     self.assertEqual(prepare(qualname(MyAnnotation))[0]().foo, 65)
     self.assertEqual(prepare([qualname(MyAnnotation)])[0]().foo, 65)
Exemple #4
0
 def test_dict_to_MapAnnotation(self):
     x = prepare({self.add.name: {'foo': 3}})
     self.assertIsInstance(x[0], MapAnnotation)
 def test_dict_to_MapAnnotation(self):
     x = prepare({add.name: {"foo": 3}})
     self.assertIsInstance(x[0], MapAnnotation)
 def test_returns_list(self):
     self.assertListEqual(prepare(1), [1])
     self.assertListEqual(prepare([1]), [1])
     self.assertListEqual(prepare((1, )), [1])
     self.assertEqual(prepare(None), ())
 def test_evalutes_qualnames(self):
     assert prepare(qualname(MyAnnotation))[0]().foo == 65
     assert prepare([qualname(MyAnnotation)])[0]().foo == 65
 def test_returns_list(self):
     assert prepare(1) == [1]
     assert prepare([1]) == [1]
     assert prepare((1,)) == [1]
     assert prepare(None) == ()
 def test_dict_to_MapAnnotation(self):
     x = prepare({self.add.name: {'foo': 3}})
     assert isinstance(x[0], MapAnnotation)
Exemple #10
0
 def test_evalutes_qualnames(self):
     assert prepare(qualname(MyAnnotation))[0]().foo == 65
     assert prepare([qualname(MyAnnotation)])[0]().foo == 65
Exemple #11
0
 def test_returns_list(self):
     assert prepare(1) == [1]
     assert prepare([1]) == [1]
     assert prepare((1, )) == [1]
     assert prepare(None) == ()