Skip to content

perf(tests): remove duplicate fixtures #647

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Draft
wants to merge 10 commits into
base: main
Choose a base branch
from
Draft

Conversation

lengau
Copy link
Collaborator

@lengau lengau commented Feb 14, 2025

  • Have you followed the guidelines for contributing?
  • Have you signed the CLA?
  • Have you successfully run make lint && make test?
  • Have you added an entry to the changelog (docs/reference/changelog.rst)?

Requires #645

This should make testing the Application more straightforward, as we're
always in debug mode when we run tests (so `run()` raises exceptions
that would otherwise become InternalErrors).

Already caught a test issue :-)
This adds a pytest plugin for craft-application, with two fixtures:

1. debug_mode: This fixture puts the app into debug mode by default.
2. production_mode: Overrides debug_mode for a function.

This is a breaking change because debug_mode is an auto-used fixture,
meaning any tests that rely on production mode will break.
@lengau lengau marked this pull request as ready for review February 20, 2025 21:24
@lengau lengau marked this pull request as draft February 20, 2025 21:24
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.

1 participant