File tree Expand file tree Collapse file tree 1 file changed +7
-4
lines changed
test/unit/tool_util/verify Expand file tree Collapse file tree 1 file changed +7
-4
lines changed Original file line number Diff line number Diff line change 88 import h5py
99except ImportError :
1010 h5py = None
11+ import pytest
1112
1213from galaxy .tool_util .parser .xml import __parse_assert_list_from_elem
1314from galaxy .tool_util .verify import asserts
@@ -489,15 +490,17 @@ def test_has_line_matching_n_failure():
489490 GZA100 = gzip .compress (A100 )
490491
491492
492- def test_has_size_success ():
493+ @pytest .mark .parametrize ("size_attrib" , ["size" , "value" ])
494+ def test_has_size_success (size_attrib ):
493495 """test has_size"""
494- a = run_assertions (SIZE_HAS_SIZE_ASSERTION .format (size_attrib = "size" , value = 10 ), TEXT_DATA_HAS_TEXT )
496+ a = run_assertions (SIZE_HAS_SIZE_ASSERTION .format (size_attrib = size_attrib , value = 10 ), TEXT_DATA_HAS_TEXT )
495497 assert len (a ) == 0
496498
497499
498- def test_has_size_failure ():
500+ @pytest .mark .parametrize ("size_attrib" , ["size" , "value" ])
501+ def test_has_size_failure (size_attrib ):
499502 """test has_size .. negative test"""
500- a = run_assertions (SIZE_HAS_SIZE_ASSERTION .format (size_attrib = "value" , value = "10" ), TEXT_DATA_HAS_TEXT * 2 )
503+ a = run_assertions (SIZE_HAS_SIZE_ASSERTION .format (size_attrib = size_attrib , value = "10" ), TEXT_DATA_HAS_TEXT * 2 )
501504 assert "Expected file size of 10+-0 found 20" in a
502505 assert len (a ) == 1
503506
You can’t perform that action at this time.
0 commit comments