Skip to content

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.

2 participants