Permalink
Browse files

Fixed DeprecationWarning in PyTest for parametrized tests

The way that parametrized tests are marked (eg. with markers like SKIP)
has changed in recent PyTest versions, and the old way will be deprecated
in PyTest 4.0. Changed to fix this, passing a pytest.param object rather
than a tuple.
  • Loading branch information...
robintw committed Oct 7, 2018
1 parent 30d6661 commit fa64e76ae2ff80beffa124938d32180f795cbd60
Showing with 2 additions and 2 deletions.
  1. +2 −2 integration_test/test_packages.py
@@ -290,8 +290,8 @@ def get_script_test_cases(configurations, recipy_samples_directory):
if SKIP in test_case:
reason = get_test_case_function_name(single_test_case)
reason = reason + ": " + test_case[SKIP]
single_test_case = pytest.mark.skip(
reason=reason)((single_test_case))
single_test_case = pytest.param((script_path, command, test_case),
marks=pytest.mark.skip(reason=reason))
test_cases.append(single_test_case)
return test_cases

0 comments on commit fa64e76

Please sign in to comment.