Skip to content

Commit

Permalink
In unitttests, error on warnings
Browse files Browse the repository at this point in the history
  • Loading branch information
jakobnissen committed Nov 7, 2023
1 parent 2d028ad commit 71dc2fa
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/unittest.yml
Original file line number Diff line number Diff line change
Expand Up @@ -39,4 +39,4 @@ jobs:
# exit-zero treats all errors as warnings. The GitHub editor is 127 chars wide
flake8 . --count --exit-zero --max-complexity=10 --max-line-length=127 --statistics
- name: Run tests
run: python -m pytest test
run: python -m pytest test -We
5 changes: 3 additions & 2 deletions test/test_results.py
Original file line number Diff line number Diff line change
Expand Up @@ -30,8 +30,9 @@ def setUp(self):
self.io.seek(0)

def test_runs(self):
comp = vamb.parsecontigs.Composition.from_file(self.io)
self.assertIsInstance(comp, vamb.parsecontigs.Composition)
with self.assertRaises(UserWarning):
comp = vamb.parsecontigs.Composition.from_file(self.io)
self.assertIsInstance(comp, vamb.parsecontigs.Composition)

if TEST_UNSTABLE_HASHES:

Expand Down
1 change: 0 additions & 1 deletion vamb/parsecontigs.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@
from collections.abc import Iterable, Sequence
from typing import IO, Union, TypeVar, Optional
from pathlib import Path
import warnings

# This kernel is created in src/create_kernel.py. See that file for explanation
_KERNEL: _np.ndarray = _vambtools.read_npz(
Expand Down

0 comments on commit 71dc2fa

Please sign in to comment.