Passed
Push — master ( b8b83a...5e3ba6 )
by Alexander
01:18
created

tests.test_things3_kanban   A

Complexity

Total Complexity 2

Size/Duplication

Total Lines 30
Duplicated Lines 0 %

Importance

Changes 0
Metric Value
eloc 17
dl 0
loc 30
rs 10
c 0
b 0
f 0
wmc 2

2 Methods

Rating   Name   Duplication   Size   Complexity  
A Things3KanbanCase.close() 0 2 1
A Things3KanbanCase.test_today() 0 6 1
1
#!/usr/bin/env python3
2
# -*- coding: utf-8 -*-
3
4
"""Module documentation goes here."""
5
6
import unittest
7
import io
8
import src.things3_kanban
9
from src.things3 import Things3
10
11
12
class Things3KanbanCase(unittest.TestCase):
13
    """Class documentation goes here."""
14
15
    things3 = Things3(database='tests/Things.sqlite3')
16
17
    class CustomStringIO(io.StringIO):
0 ignored issues
show
introduced by
Missing class docstring
Loading history...
18
        def close(self):
19
            True
0 ignored issues
show
Unused Code introduced by
This statement seems to have no effect and could be removed.

This issue is typically triggered when a function that does not have side-effects is called and the return value is discarded:

class SomeClass:
    def __init__(self):
        self._x = 5

    def squared(self):
        return self._x * self._x

some_class = SomeClass()
some_class.squared()        # Flagged, as the return value is not used
print(some_class.squared()) # Ok
Loading history...
20
21
    def test_today(self):
22
        """Test Today."""
23
        output = self.CustomStringIO()
24
        src.things3_kanban.THINGS3 = self.things3
25
        src.things3_kanban.main(output)
26
        self.assertIn("Today Todo", output.getvalue())
27
28
if __name__ == '__main__':
29
    unittest.main()
30