Skip to content

Change test_mode to an app property#2327

Merged
freakboy3742 merged 4 commits intobeeware:mainfrom
timrid:misc/test-mode-as-app-config-property
Jun 5, 2025
Merged

Change test_mode to an app property#2327
freakboy3742 merged 4 commits intobeeware:mainfrom
timrid:misc/test-mode-as-app-config-property

Conversation

@timrid
Copy link
Contributor

@timrid timrid commented Jun 4, 2025

In this PR, the test_mode Flag becomes a property of the AppConfig as suggested in #2173 (review). This simplifies the code, as test_mode is only required at a few points and no longer has to be passed through all functions.

This refactoring simplifies adding a new debug_mode in #2173.

PR Checklist:

  • All new features have been tested
  • All new features have been documented
  • I have read the CONTRIBUTING.md file
  • I will abide by the code of conduct

@timrid timrid marked this pull request as ready for review June 4, 2025 20:31
Copy link
Member

@freakboy3742 freakboy3742 left a comment

Choose a reason for hiding this comment

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

It's a big change, but I think the shape of the changes that have been required in the test suite indicates it's the right move - it's mostly removing test_mode context from places where it isn't really relevant, so we can inject it explicitly in the handful of places where it matters.

Thanks for taking this on - most appreciated!

@freakboy3742 freakboy3742 merged commit 7d2ed52 into beeware:main Jun 5, 2025
57 checks passed
@timrid timrid mentioned this pull request Jun 14, 2025
4 tasks
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