Coverage for tests/test_cli.py: 100%
5 statements
« prev ^ index » next coverage.py v7.4.0, created at 2024-02-05 19:37 +0100
« prev ^ index » next coverage.py v7.4.0, created at 2024-02-05 19:37 +0100
1import subprocess as sp
3from inline_snapshot import snapshot
6def test_cli():
7 result = sp.run(["canonical-imports", "--help"], capture_output=True)
8 assert result.returncode == 0
9 assert result.stdout.decode() == snapshot(
10 """\
11Usage: canonical-imports [OPTIONS] [PATHS]...
13 `canonical-imports` follows your imports and finds out where the things you
14 are importing are actually defined.
16 PATHS: python files or directories with should be scanned for python files
18Options:
19 --no [public-private|into-init]
20 Exclude specific imports
21 -w, --write write changed imports
22 --help Show this message and exit.
23"""
24 )