diff options
Diffstat (limited to 'tests/unittests/test_util.py')
-rw-r--r-- | tests/unittests/test_util.py | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/tests/unittests/test_util.py b/tests/unittests/test_util.py index 3b76ead8..eab374bc 100644 --- a/tests/unittests/test_util.py +++ b/tests/unittests/test_util.py @@ -1010,11 +1010,17 @@ class TestIsLXD(CiTestCase): class TestReadCcFromCmdline: + if hasattr(pytest, "param"): + random_string = pytest.param( + CiTestCase.random_string(), None, id="random_string") + else: + random_string = (CiTestCase.random_string(), None) + @pytest.mark.parametrize( "cmdline,expected_cfg", [ # Return None if cmdline has no cc:<YAML>end_cc content. - (CiTestCase.random_string(), None), + random_string, # Return None if YAML content is empty string. ('foo cc: end_cc bar', None), # Return expected dictionary without trailing end_cc marker. |