tests.test_cli   A
last analyzed

Complexity

Total Complexity 2

Size/Duplication

Total Lines 20
Duplicated Lines 0 %

Importance

Changes 0
Metric Value
eloc 14
dl 0
loc 20
rs 10
c 0
b 0
f 0
wmc 2

2 Methods

Rating   Name   Duplication   Size   Complexity  
A TestCli.test_build_bare() 0 5 1
A TestCli.test_build_tox() 0 3 1
1
import pytest
2
3
from tyrannosaurus.cli import CliCommands
4
5
6
class TestCli:
7
    def test_build_tox(self):
8
        cmds = CliCommands.build_internal(dry=True)
9
        assert cmds == ["tyrannosaurus sync", "poetry lock", "tox", "tyrannosaurus clean"]
10
11
    def test_build_bare(self):
12
        cmds = CliCommands.build_internal(bare=True, dry=True)
13
        assert len(cmds) == 15
14
        assert cmds[0] == "tyrannosaurus sync"
15
        assert cmds[-1] == "pip install ."
16
17
18
if __name__ == "__main__":
19
    pytest.main()
20