Skip to content

Enable warnings in tests/test_examples.py - #3461

Open
aBiR1D wants to merge 1 commit into
pyro-ppl:devfrom
aBiR1D:fix-enable-warnings-in-tests-test-examples-p-6
Open

Enable warnings in tests/test_examples.py#3461
aBiR1D wants to merge 1 commit into
pyro-ppl:devfrom
aBiR1D:fix-enable-warnings-in-tests-test-examples-p-6

Conversation

@aBiR1D

@aBiR1D aBiR1D commented Jul 24, 2026

Copy link
Copy Markdown

Fixes #2201

The fix adds a WARNINGS list that mirrors the [tool:pytest] filterwarnings config from setup.cfg, then passes those as Python -W flags in every check_call() invocation. This ensures examples run via subprocess get the same -Werror treatment (with the same exceptions) as regular pytest tests.

Pass -W flags to subprocess.check_call() matching the pytest
filterwarnings config from setup.cfg, so warnings from examples
are caught during testing.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Enable warnings in tests/test_examples.py

1 participant