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