예제 #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()))