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:
1 parent
a796dc59bd
commit
088c3b633d
2 files changed
+140
-10
No files matched your search
@@ -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
|
||||
Reference in new issue
Block a user