From abec8e54e312ac37a87100ea8da25d159dcc31f3 Mon Sep 17 00:00:00 2001 From: Andrew Zhu Date: Fri, 28 Feb 2020 12:22:44 -0800 Subject: [PATCH] add some coverage config --- .coveragerc | 10 ++++++++++ .github/workflows/pytest.yml | 2 +- 2 files changed, 11 insertions(+), 1 deletion(-) create mode 100644 .coveragerc diff --git a/.coveragerc b/.coveragerc new file mode 100644 index 0000000..96a948e --- /dev/null +++ b/.coveragerc @@ -0,0 +1,10 @@ +[report] +# Regexes for lines to exclude from consideration +exclude_lines = + pragma: no cover + def __repr__ + if self\.debug + raise AssertionError + raise NotImplementedError + if 0: + if __name__ == .__main__.: \ No newline at end of file diff --git a/.github/workflows/pytest.yml b/.github/workflows/pytest.yml index aa915a6..f87988b 100644 --- a/.github/workflows/pytest.yml +++ b/.github/workflows/pytest.yml @@ -32,7 +32,7 @@ jobs: run: | pip install pytest pip install pytest-cov - pytest --cov=./ --cov-report=xml + pytest --cov=./ --cov-report=xml --cov-config=.coveragerc - name: Upload coverage to Codecov uses: codecov/codecov-action@v1 with: