Skip to content

Commit

Permalink
Fixed linting issues
Browse files Browse the repository at this point in the history
  • Loading branch information
BrentBlanckaert committed Nov 20, 2024
1 parent 7aff25d commit 165f94d
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 7 deletions.
2 changes: 0 additions & 2 deletions tested/languages/generation.py
Original file line number Diff line number Diff line change
Expand Up @@ -157,8 +157,6 @@ def get_readable_input(
if case.line_comment:
text = f"{text} {bundle.language.comment(case.line_comment)}"

Check warning on line 158 in tested/languages/generation.py

View check run for this annotation

Codecov / codecov/patch

tested/languages/generation.py#L158

Added line #L158 was not covered by tests



# If there are no files, return now. This means we don't need to do ugly stuff.
if not case.link_files:
return ExtendedMessage(description=text, format=format_), set()
Expand Down
21 changes: 16 additions & 5 deletions tests/test_functionality.py
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,7 @@ def test_global_variable_yaml(
updates = assert_valid_output(result, pytestconfig)
assert updates.find_status_enum() == ["correct"]


@pytest.mark.parametrize(
"language, comment_start",
[
Expand All @@ -75,7 +76,12 @@ def test_global_comment(
language: str, comment_start: str, tmp_path: Path, pytestconfig: pytest.Config
):
conf = configuration(
pytestconfig, "global", language, tmp_path, "plan_no_description.yaml", "correct"
pytestconfig,
"global",
language,
tmp_path,
"plan_no_description.yaml",
"correct",
)
result = execute_config(conf)
updates = assert_valid_output(result, pytestconfig)
Expand All @@ -86,10 +92,9 @@ def test_global_comment(
f"{comment_start} The name of the global variable"
)


@pytest.mark.parametrize("language", ALL_LANGUAGES)
def test_global_no_comment(
language: str, tmp_path: Path, pytestconfig: pytest.Config
):
def test_global_no_comment(language: str, tmp_path: Path, pytestconfig: pytest.Config):
conf = configuration(
pytestconfig, "global", language, tmp_path, "plan.yaml", "correct"
)
Expand All @@ -100,12 +105,18 @@ def test_global_no_comment(
assert "description" in description and "description" in description["description"]
assert description["description"]["description"] == "Hallo"


@pytest.mark.parametrize("language", ALL_LANGUAGES)
def test_global_comment_description(
language: str, tmp_path: Path, pytestconfig: pytest.Config
):
conf = configuration(
pytestconfig, "global", language, tmp_path, "comment_description_plan.yaml", "correct"
pytestconfig,
"global",
language,
tmp_path,
"comment_description_plan.yaml",
"correct",
)
result = execute_config(conf)
updates = assert_valid_output(result, pytestconfig)
Expand Down

0 comments on commit 165f94d

Please sign in to comment.