Skip to content

tests: add --strict-optional flag for dependency-gated skips - #808

Open
mayaecht wants to merge 1 commit into
apache:trunkfrom
mayaecht:trunk-pyhttpd-strict-mode-flag
Open

mayaecht wants to merge 1 commit into
apache:trunkfrom
mayaecht:trunk-pyhttpd-strict-mode-flag

Conversation

@mayaecht

@mayaecht mayaecht commented Oct 8, 2026

Copy link
Copy Markdown

This change adds a strict mode for optional test dependencies.

When enabled, tests that would normally be skipped due to missing
optional dependencies fail instead, making missing test prerequisites
visible in CI and local development environments.

Changes include:

  • support for strict optional dependency enforcement
  • environment variable support to enable strict mode
  • dependency reporting improvements
  • documentation updates
  • unit tests covering default and strict behavior

Tests:
pytest test/test_strict_optional.py -v
21 passed

@csutherl csutherl left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You shouldn't commit the __pycache__ dirs. The httpd .gitignore seems insufficient to catch them as deeply embedded in the dir structure as they are. Maybe incorporate some of the standard python .gitignore from https://github.com/github/gitignore/blob/main/Python.gitignore and retry to see if that cleans it up? Alternatively you could ditch test/__pycache__ and just use __pycache__/ I think.

@mayaecht
mayaecht force-pushed the trunk-pyhttpd-strict-mode-flag branch from 660cb31 to 3e09263 Compare October 8, 2026 19:26
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.

2 participants