diff --git a/CHANGELOG.md b/CHANGELOG.md index c9eddcfc..37b7d924 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -10,6 +10,7 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0. ### Added - Add comprehensive test coverage for warning context managers (`ignore()` and `strict()`) ([#832](https://github.com/stac-utils/pystac-client/pull/832)) +- Moved -Werror to pyproject.toml ([#841](https://github.com/stac-utils/pystac-client/pull/841)) ### Changed diff --git a/pyproject.toml b/pyproject.toml index 5ce2ce27..c78a2d22 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -109,7 +109,7 @@ select = ["E", "F", "W", "I"] [tool.pytest.ini_options] markers = "vcr: records network activity" -addopts = "--benchmark-skip --block-network" +addopts = "--benchmark-skip --block-network -Werror" filterwarnings = [ "ignore::ResourceWarning", "ignore::pytest.PytestUnraisableExceptionWarning", diff --git a/scripts/test b/scripts/test index 01e4a704..3c468629 100755 --- a/scripts/test +++ b/scripts/test @@ -20,7 +20,7 @@ if [ "${BASH_SOURCE[0]}" = "${0}" ]; then ./scripts/lint ./scripts/format # Test suite with coverage enabled - pytest -Werror --cov pystac_client --cov-report term-missing + pytest --cov pystac_client --cov-report term-missing coverage xml fi fi diff --git a/tests/test_warnings.py b/tests/test_warnings.py index b878d628..2e0998fc 100644 --- a/tests/test_warnings.py +++ b/tests/test_warnings.py @@ -7,7 +7,6 @@ class TestWarningContextManagers: - @pytest.mark.filterwarnings("error") def test_ignore_context_manager(self) -> None: """Test that ignore() context manager suppresses warnings.""" api = Client.from_file(str(TEST_DATA / "planetary-computer-root.json")) @@ -16,7 +15,6 @@ def test_ignore_context_manager(self) -> None: with ignore(): api.collection_search(limit=10, max_collections=10, q="test") - @pytest.mark.filterwarnings("error") def test_strict_context_manager(self) -> None: """Test that strict() context manager converts warnings to exceptions.""" api = Client.from_file(str(TEST_DATA / "planetary-computer-root.json"))