Поддержка тестирования кода

This commit is contained in:
2019-07-04 11:55:22 +03:00
parent 2469567d6a
commit 56f6527595
4 changed files with 25 additions and 0 deletions

0
tests/__init__.py Normal file
View File

19
tests/test_ap.py Normal file
View File

@ -0,0 +1,19 @@
import os
import sys
sys.path.insert(0, os.path.abspath('..'))
import pytest
from py3x.functions import parse_args
def test_parse_args_verbose():
args = parse_args(['-v'])
assert args
def test_parse_args_input():
args = parse_args(['-i', 'input'])
assert args
def test_parse_args_unused():
with pytest.raises(SystemExit):
args = parse_args(['-b'])