* fix a bunch of formatting problems that only show up for combined card types in languages other than english * add tests that actually perform generation during testing
25 lines
545 B
Python
25 lines
545 B
Python
from __future__ import print_function
|
|
|
|
import pytest
|
|
|
|
from .. 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)
|