Total Complexity | 1 |
Total Lines | 26 |
Duplicated Lines | 0 % |
Changes | 0 |
1 | from datetime import date |
||
2 | |||
3 | import pytest |
||
4 | |||
5 | from tests import TestResources |
||
6 | |||
7 | # noinspection PyProtectedMember |
||
8 | from tyrannosaurus.context import Context |
||
9 | from tyrannosaurus.sync import Sync |
||
10 | |||
11 | |||
12 | class TestSync: |
||
13 | def test_fix_init(self): |
||
14 | path = TestResources.resource("fake") |
||
15 | context = Context(path, dry_run=True) |
||
16 | sync = Sync(context) |
||
17 | lines = sync.fix_init() |
||
18 | assert len(lines) == 3 |
||
19 | assert lines[0] == f'__copyright__ = "Copyright {date.today().year}"' |
||
20 | assert lines[1] == f'__date__ = "{date.today()}"' |
||
21 | assert lines[2] == '__status__ = "Development"' |
||
22 | |||
23 | |||
24 | if __name__ == "__main__": |
||
25 | pytest.main() |
||
26 |