Commit 17e308ad authored by Robin Obůrka's avatar Robin Obůrka

tests: Add skeleton for argparser testing

parent 2b09f552
from .fixtures import *
import pytest
import sn
@pytest.fixture
def arg_parser():
return sn.get_arg_parser()
@pytest.fixture
def empty_args():
return []
@pytest.fixture(params=[
"--resource",
])
def bad_args(request):
return request.param.split(" ")
import pytest
import argparse
import sn
def test_empty_args(arg_parser, empty_args):
with pytest.raises(SystemExit):
arg_parser.parse_args(empty_args)
def test_bad_args(arg_parser, bad_args):
with pytest.raises(SystemExit):
arg_parser.parse_args(bad_args)
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment