Пример #1
0
 def test_integer_more(self):
     self.assertTrue(tools._is_multiple(3))
Пример #2
0
 def test_integer_one(self):
     self.assertFalse(tools._is_multiple(1))
Пример #3
0
 def test_integer_negative_one(self):
     self.assertFalse(tools._is_multiple(-1))
Пример #4
0
 def test_set_multiple(self):
     self.assertTrue(tools._is_multiple({"item1", "item2"}))
Пример #5
0
 def test_integer_zero(self):
     self.assertTrue(tools._is_multiple(0))
Пример #6
0
 def test_set_empty(self):
     self.assertTrue(tools._is_multiple(set()))
Пример #7
0
 def test_set_single(self):
     self.assertFalse(tools._is_multiple({"the only set item"}))
Пример #8
0
 def test_dict_single(self):
     self.assertFalse(tools._is_multiple({"the only index": "something"}))
Пример #9
0
 def test_dict_multiple(self):
     self.assertTrue(tools._is_multiple({1: "item1", 2: "item2"}))
Пример #10
0
 def test_list_multiple(self):
     self.assertTrue(tools._is_multiple(["item1", "item2"]))
Пример #11
0
 def test_dict_empty(self):
     self.assertTrue(tools._is_multiple({}))
Пример #12
0
 def test_list_single(self):
     self.assertFalse(tools._is_multiple(["the only list item"]))
Пример #13
0
 def test_list_empty(self):
     self.assertTrue(tools._is_multiple([]))
Пример #14
0
 def test_string(self):
     self.assertFalse(tools._is_multiple("some string"))
Пример #15
0
 def test_empty_string(self):
     self.assertFalse(tools._is_multiple(""))
Пример #16
0
    def test_unsupported(self):
        def empty_func():
            pass

        self.assertFalse(tools._is_multiple(empty_func()))