Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 7 additions & 1 deletion tests/unittests/test_util.py
Original file line number Diff line number Diff line change
Expand Up @@ -972,11 +972,17 @@ def test_is_lxd_false_when_sock_device_absent(self, m_exists):


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.
Expand Down