Completed
Pull Request — master (#17)
by Amresh
01:22
created

test.test__utils   A

Complexity

Total Complexity 3

Size/Duplication

Total Lines 20
Duplicated Lines 0 %

Importance

Changes 0
Metric Value
wmc 3
eloc 15
dl 0
loc 20
rs 10
c 0
b 0
f 0

3 Methods

Rating   Name   Duplication   Size   Complexity  
A TestUtilsCountTruthy.test__count_truthy__DB40D6FA9F() 0 3 1
A TestUtilsCountTruthy.test__count_truthy__73AFF983FB() 0 3 1
A TestUtilsToCamelCase.test__to_camel_case__980D6D2AC9() 0 3 1
1
from fastest.utils import count_truthy
2
from fastest.utils import to_camel_case
3
import unittest
4
5
6
class TestUtilsCountTruthy(unittest.TestCase):
7
    def test__count_truthy__DB40D6FA9F(self):
8
        self.assertIsInstance(count_truthy([]), int)
9
        self.assertEqual(count_truthy([1, 2, None, 'a']), 3)
10
11
    def test__count_truthy__73AFF983FB(self):
12
        self.assertIsInstance(count_truthy([]), int)
13
        self.assertEqual(count_truthy([1, 2, 0, 'a']), 4)
14
15
16
class TestUtilsToCamelCase(unittest.TestCase):
17
    def test__to_camel_case__980D6D2AC9(self):
18
        self.assertIsInstance(to_camel_case(''), str)
19
        self.assertEqual(to_camel_case('snake_cased_string'), 'SnakeCasedString')
20