Skip to content
This repository was archived by the owner on Oct 24, 2024. It is now read-only.

Commit 1adfb55

Browse files
committed
Add a starting point for testing the CLI
1 parent b831a14 commit 1adfb55

File tree

1 file changed

+15
-0
lines changed

1 file changed

+15
-0
lines changed

tests/test_cli.py

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
from os import path
2+
import plac
3+
import sys
4+
5+
try:
6+
thisdir = path.dirname(path.abspath(__file__))
7+
sys.path.append(path.join(thisdir, '..'))
8+
except Exception: # noqa: PIE786
9+
sys.path.append('..')
10+
11+
12+
def test_usage_help(capsys):
13+
from %PROJECT_NAME%.__main__ import main
14+
with plac.Interpreter(main) as i:
15+
i.check('-h', '')

0 commit comments

Comments
 (0)