* precommit hooks and changes because of these * mv package into src dir * add requirements file, clean up setup reqs, add precommit to CI
25 lines
549 B
Python
25 lines
549 B
Python
from __future__ import print_function
|
|
|
|
import pytest
|
|
|
|
from domdiv import main
|
|
|
|
|
|
def get_clean_opts(opts):
|
|
options = main.parse_opts(opts)
|
|
options = main.clean_opts(options)
|
|
return options
|
|
|
|
|
|
def test_standard_opts():
|
|
# should be the default
|
|
options = get_clean_opts([])
|
|
main.generate(options)
|
|
|
|
|
|
@pytest.mark.parametrize("lang", main.get_languages("card_db"))
|
|
def test_grouped(lang):
|
|
print("checking " + lang)
|
|
options = get_clean_opts(["--special-card-groups", "--language={}".format(lang)])
|
|
main.generate(options)
|