Поддержка тестирования кода
This commit is contained in:
0
tests/__init__.py
Normal file
0
tests/__init__.py
Normal file
19
tests/test_ap.py
Normal file
19
tests/test_ap.py
Normal 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'])
|
||||
|
Reference in New Issue
Block a user