tests.test_cli.TestCli.test_build_tox()   A
last analyzed

Complexity

Conditions 1

Size

Total Lines 3
Code Lines 3

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
cc 1
eloc 3
nop 1
dl 0
loc 3
rs 10
c 0
b 0
f 0
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