예제 #1
0
def test_count():
    data = (
        0,
        1,
        1.1,
        '1.1',
        True,
        False,
        'A',
        'TRUE',
        'FALSE',
    )
    assert count(data, data[3], data[5], data[7])
예제 #2
0
 def test_with_text_representations(self):
     assert 4 == count([1, '2.2', 'e'], True, '20')
예제 #3
0
 def test_with_nested_booleans(self):
     assert 2 == count([1, True, 'e'], True, 'r')
예제 #4
0
 def test_without_nested_booleans(self):
     assert 3 == count([1, 2, 'e'], True, 'r')
예제 #5
0
 def test_with_date_representations(self):
     assert 4 == count([1, '2.2', dt.datetime.now()], True, '20')
예제 #6
0
 def test_with_text_representations(self):
     self.assertEqual(count([1, '2.2', 'e'], True, '20'), 4)
예제 #7
0
 def test_with_date_representations(self):
     assert 4 == count([1, '2.2', dt.datetime.now()], True, '20')
예제 #8
0
 def test_with_nested_booleans(self):
     self.assertEqual(count([1, True, 'e'], True, 'r'), 2)
예제 #9
0
 def test_with_text_representations(self):
     assert 4 == count([1, '2.2', 'e'], True, '20')
예제 #10
0
 def test_with_nested_booleans(self):
     assert 2 == count([1, True, 'e'], True, 'r')
예제 #11
0
 def test_without_nested_booleans(self):
     assert 3 == count([1, 2, 'e'], True, 'r')
예제 #12
0
 def test_with_text_representations(self):
     self.assertEqual(count([1, '2.2', 'e'], True, '20'), 4)
예제 #13
0
 def test_with_nested_booleans(self):
     self.assertEqual(count([1, True, 'e'], True, 'r'), 2)