Skip to content
This repository was archived by the owner on Sep 14, 2020. It is now read-only.

Treat all warnings in tests as errors, reduce verbosity #312

Merged
merged 15 commits into from
Feb 20, 2020
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Fail on warnings by default: even from CLI, not only in Travis CI
  • Loading branch information
nolar committed Feb 20, 2020
commit 4bfdb9b4c651091096f0bc5dc67742d8624fb565
4 changes: 2 additions & 2 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -39,10 +39,10 @@ before_script:
- tools/kubernetes-client.sh

script:
- pytest -Werror --cov=kopf --cov-branch
- pytest --cov=kopf --cov-branch
- coveralls
- codecov --flags unit
- pytest -Werror --only-e2e # NB: after the coverage uploads!
- pytest --only-e2e # NB: after the coverage uploads!
- mypy kopf --strict --pretty

deploy:
Expand Down
3 changes: 3 additions & 0 deletions tests/conftest.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,9 @@ def pytest_configure(config):
config.addinivalue_line('markers', "e2e: end-to-end tests with real operators.")
config.addinivalue_line('markers', "resource_clustered: (internal parameterizatiom mark).")

# Unexpected warnings should fail the tests. Use `-Wignore` to explicitly disable it.
config.addinivalue_line('filterwarnings', 'error')


def pytest_addoption(parser):
parser.addoption("--only-e2e", action="store_true", help="Execute end-to-end tests only.")
Expand Down