Skip to content

Commit

Permalink
Merge pull request #361 from naik-aakash/fix_codecov_failure
Browse files Browse the repository at this point in the history
Fix codecov failure
  • Loading branch information
naik-aakash authored Jan 14, 2025
2 parents ab90778 + 5378b64 commit e56c4ca
Show file tree
Hide file tree
Showing 3 changed files with 19 additions and 11 deletions.
1 change: 1 addition & 0 deletions codecov.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,3 +4,4 @@ coverage:
default:
target: 97%
threshold: 1%
patch: off
25 changes: 14 additions & 11 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -146,17 +146,20 @@ addopts = "-x --durations=30 --quiet -rxXs --color=yes -p no:warnings"

[tool.coverage.report]
exclude_lines = [
"pragma: no cover",
"def __repr__",
"if self.debug:",
"if settings.DEBUG",
"raise AssertionError",
"raise NotImplementedError",
"if 0:",
"if __name__ == .__main__.:",
"@deprecated",
"show_plot",
"if typing.TYPE_CHECKING:",
"pragma: no cover",
"def __repr__",
"def main()",
"main()",
"if self.debug:",
"if TYPE_CHECKING:",
"if settings.DEBUG",
"raise AssertionError",
"raise NotImplementedError",
"if 0:",
"if __name__ == __main__:",
"@deprecated",
"show_plot",
"if typing.TYPE_CHECKING:",
]

[tool.coverage.run]
Expand Down
4 changes: 4 additions & 0 deletions tests/cli/test_cli.py
Original file line number Diff line number Diff line change
Expand Up @@ -722,12 +722,16 @@ def test_dos_plot(self, tmp_path, inject_mocks, clean_plot):
run(test)

os.chdir(TestDir / "test_data/NaCl_comp_range")
plot_path = tmp_path / "dos_plot.png"
args = [
"plot-dos",
"--saveplot",
str(plot_path),
]

test = get_parser().parse_args(args)
run(test)
self.assert_is_finite_file(plot_path)

def test_cli_exceptions(self):
# Calc files missing exception test
Expand Down

0 comments on commit e56c4ca

Please sign in to comment.