Add only-type-any and only-type-all options (#241)

* Added only-type options
* added ci test for only-type options
This commit is contained in:
Wendel Voigt authored and Peter committed 2019-02-17 20:41:58 -08:00
1 parent a796dc59bd
commit 088c3b633d
2 files changed
+140 -10

No files matched your search

+16
View File
@@ -111,3 +111,19 @@ def test_languagetool_run(pytestconfig):
except subprocess.CalledProcessError as e:
assert e.output == ''
assert out.decode('utf-8') == ''
def test_only_type():
options = main.parse_opts(['--expansions', 'base', 'alchemy',
'--include-blanks', '5',
'--only-type-any', 'blank', 'curse',
'--only-type-all', 'attack', 'action'])
options = main.clean_opts(options)
options.data_path = '.'
cards = main.read_card_data(options)
cards = main.filter_sort_cards(cards, options)
# Total 8 from
# Blank: +5 added in options
# Curse: +1 from base
# Action Attack: +2 from Alchemy
assert len(cards) == 8