def test_generic_wrapper_enum(self):
     self.assertEqual(generic_wrapper(1, TestEnum, 0), TestEnum.ValOne)
     self.assertEqual(generic_wrapper(3, TestEnum, 0), 0)
Beispiel #2
0
 def test_generic_wrapper_enum(self):
     self.assertEqual(generic_wrapper(1, TestEnum, 0), TestEnum.ValOne)
     self.assertEqual(generic_wrapper(3, TestEnum, 0), 0)
 def test_generic_wrapper_basic(self):
     self.assertEqual(generic_wrapper(1, None, 0), 1)
     self.assertEqual(generic_wrapper(1, lambda x: 2*x, 0), 2)
Beispiel #4
0
 def test_generic_wrapper_basic(self):
     self.assertEqual(generic_wrapper(1, None, 0), 1)
     self.assertEqual(generic_wrapper(1, lambda x: 2 * x, 0), 2)