Completed
Push — master ( 8c5af0...53749f )
by Wojtek
8s
created

TestGrortir.test_branch_coverage()   A

Complexity

Conditions 1

Size

Total Lines 5

Duplication

Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
c 1
b 0
f 0
dl 0
loc 5
rs 9.4285
cc 1
1
"""Sample unit test module."""
2
3
import unittest
4
5
from grortir import sample
6
7
8
class TestGrortir(unittest.TestCase):
9
10
    """Sample unit test class."""
11
12
    def test_dependency_import(self):
13
        """Sample test method for dependencies."""
14
        try:
15
            import testpackage  # pylint: disable=unused-variable
0 ignored issues
show
introduced by
Locally disabling unused-variable (W0612)
Loading history...
16
            assert True
17
        except ImportError:
18
            self.fail("dependency not installed")
19
20
    def test_branch_coverage(self):
21
        """Sample test method for branch coverage."""
22
        self.assertEqual(sample.function(True), 'True')
23
        self.assertEqual(sample.function(False), 'False')
24
        self.assertEqual(sample.function(None), 'None')
25