Example #1
0
 def test_oneof(self):
     self.assertEqual(oneof(), False)
     self.assertEqual(oneof(True), True)
     self.assertEqual(oneof(False), False)
     self.assertEqual(oneof(0, False, "a"), True)
     self.assertEqual(oneof(0, True, False, "a"), False)
     self.assertEqual(oneof(1, True, "a"), False)
     self.assertEqual(oneof(0, False, ""), False)
Example #2
0
 def test_oneof(self):
     self.assertEqual(oneof(), False)
     self.assertEqual(oneof(True), True)
     self.assertEqual(oneof(False), False)
     self.assertEqual(oneof(0, False, "a"), True)
     self.assertEqual(oneof(0, True, False, "a"), False)
     self.assertEqual(oneof(1, True, "a"), False)
     self.assertEqual(oneof(0, False, ""), False)