Skip to content

Commit 12779e8

Browse files
committed
Changed back from pytest-cov to coverage
1 parent 96f7d13 commit 12779e8

File tree

5 files changed

+8
-10
lines changed

5 files changed

+8
-10
lines changed

.github/workflows/python-package.yml

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -38,9 +38,11 @@ jobs:
3838
- name: Install bashplot
3939
run: |
4040
pip install .
41-
- name: Test with pytest
41+
- name: Test with pytest and coverage
4242
run: |
43-
pytest -vv --cov=./test --cov-report=xml
43+
coverage run -m pytest test/test*.py -vv
44+
coverage report -m
45+
coverage xml
4446
- name: Codecov
4547
uses: codecov/codecov-action@v1
4648
with:

azure-pipelines.yml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,5 +44,7 @@ steps:
4444
displayName: 'Install bashplot'
4545

4646
- script: |
47-
pytest -vv --cov=./test --cov-report=xml
47+
coverage run -m pytest test/test*.py -vv
48+
coverage report -m
49+
coverage xml
4850
displayName: 'pytest'

dev-requirements.txt

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,6 @@ pyflakes==2.2.0; python_version >= '2.7' and python_version not in '3.0, 3.1, 3.
2626
pyparsing==2.4.7; python_version >= '2.6' and python_version not in '3.0, 3.1, 3.2, 3.3'
2727
pytest==6.2.1
2828
pytest-clarity==0.3.0a0
29-
pytest-cov==2.10.1
3029
pytest-sugar==0.9.4
3130
regex==2020.11.13
3231
snowballstemmer==2.0.0

test/sample_generator.py

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -45,8 +45,4 @@ def generate(fname="test_data"):
4545
x = np.linspace(-0.3, 0.3)
4646
y = np.random.normal(mu, sigma, 50)
4747
data = np.array([x, y]).T
48-
np.savetxt(Path(f"./{fname}__random_gaussian.txt"), data)
49-
50-
51-
if __name__ == "__main__":
52-
generate()
48+
np.savetxt(Path(f"./{fname}_random_gaussian.txt"), data)

test/test_bashplot.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,6 @@
6363

6464

6565
def test_fnames():
66-
6766
assert bashplot.get_args(opt={"infile": test_txt})["infile"] == test_txt
6867

6968

0 commit comments

Comments
 (0)