Total Complexity | 2 |
Total Lines | 23 |
Duplicated Lines | 0 % |
Changes | 0 |
1 | import pytest |
||
2 | |||
3 | from tyrannosaurus.context import Context |
||
4 | from tyrannosaurus.update import Update |
||
5 | |||
6 | from . import TestResources |
||
7 | |||
8 | |||
9 | class TestUpdate: |
||
10 | def test_update(self): |
||
11 | with TestResources.temp_dir("fake") as path: |
||
12 | # TODO use a fake pypi getter |
||
13 | context = Context(path, dry_run=True) |
||
14 | update = Update(context) |
||
15 | pkgs, devs = update.update() |
||
16 | # cheat flake8 here: |
||
17 | assert [x for x in sorted(pkgs.keys())] == ["requests", "tomlkit", "typer"] |
||
18 | assert list(devs) == ["pytest"] |
||
19 | |||
20 | |||
21 | if __name__ == "__main__": |
||
22 | pytest.main() |
||
23 |