Пример #1
0
 def test_int(self):
     self.assertEqual(cases.case(4), True)
Пример #2
0
 def test_lessthanzero(self):
     self.assertEqual(cases.case(-1), True)
Пример #3
0
 def test_string(self):
     self.assertEqual(cases.case('example'), True)
Пример #4
0
 def test_zero(self):
     self.assertEqual(cases.case(0), True)
Пример #5
0
 def test_greaterthanzero(self):
     self.assertEqual(cases.case(2), True)
Пример #6
0
 def test_odd(self):
     self.assertEqual(cases.case(9), True)
Пример #7
0
 def test_even(self):
     self.assertEqual(cases.case(4), True)
Пример #8
0
 def test_float(self):
     self.assertEqual(cases.case(0.75), True)
Пример #9
0
 def test_dict(self):
     self.assertEqual(cases.case({'a': 2}), True)
Пример #10
0
 def test_list(self):
     self.assertEqual(cases.case(['a', 2]), True)