Skip to content

Commit

Permalink
Update test suite after b795167
Browse files Browse the repository at this point in the history
  • Loading branch information
JasperCraeghs committed Nov 7, 2023
1 parent b795167 commit cda7224
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"sphinx": {
"enabled": true,
"cq_default_path": "doc/source/conf.py",
"cq_description_format": "{FIRST_ENVVAR} | {description} ({SECOND_ENVVAR})",
"cq_description_template": "$FIRST_ENVVAR | $description ($SECOND_ENVVAR)",
"min": 0,
"max": 0
},
Expand Down
6 changes: 3 additions & 3 deletions tests/test_integration.py
Original file line number Diff line number Diff line change
Expand Up @@ -323,12 +323,12 @@ def test_cq_description_format_missing_envvar(self):
with self.assertRaises(ValueError) as c_m:
warnings_wrapper([
'--code-quality', out_file,
'--config', 'tests/test_in/config_code_quality_format.json',
'--config', 'tests/test_in/config_cq_description_format.json',
'tests/test_in/mixed_warnings.txt',
])
self.assertEqual(
str(c_m.exception),
"Failed to find environment value while assembling code quality description: 'SECOND_ENVVAR'")
"Failed to find environment variable from configuration value 'cq_description_template': 'SECOND_ENVVAR'")

@patch('pathlib.Path.cwd')
def test_cq_description_format(self, path_cwd_mock):
Expand All @@ -340,7 +340,7 @@ def test_cq_description_format(self, path_cwd_mock):
ref_file = str(TEST_IN_DIR / filename)
retval = warnings_wrapper([
'--code-quality', out_file,
'--config', 'tests/test_in/config_code_quality_format.json',
'--config', 'tests/test_in/config_cq_description_format.json',
'tests/test_in/mixed_warnings.txt',
])
self.assertEqual(2, retval)
Expand Down

0 comments on commit cda7224

Please sign in to comment.