Skip to content

Conversation

@cjames23
Copy link
Member

This PR adds tests for regression of dev-mode to ensure that it properly triggers the condition that caused the regression. It also adds additional tests to try to get more coverage on EnvironmentInterface for other potential areas that regressions in the future could occur.

Copy link
Contributor

@ofek ofek left a comment

Choose a reason for hiding this comment

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

Thanks a lot!

project = Project(project_path)
helpers.update_project_environment(project, "default", {"dev-mode": False, **project.config.envs["default"]})
helpers.update_project_environment(
project, "default", {"dev-mode": False, "extra-dependencies": ["binary"], **project.config.envs["default"]}
Copy link
Contributor

Choose a reason for hiding this comment

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

What's the purpose of adding an extra dependency here to the base test for non-dev mode project installation? If this is not strictly required for testing correctness then I'd prefer to remove it.

Copy link
Member Author

Choose a reason for hiding this comment

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

Without this it does not trigger that regression we saw because the regression was in the VirtualEnvironment.sync_dependencies functionality. This just ensures that code path always gets triggered.

@cjames23 cjames23 merged commit 4776f11 into pypa:master Dec 11, 2025
49 checks passed
github-actions bot pushed a commit to almir-hrvanovic/hatch that referenced this pull request Dec 17, 2025
* Add more unit tests that cover regressions and additional cases to ensure no future regressions occur

* Remove duplicated test

* Fix formatting

* Avoid isolation for new tests that pollutes in memory config tests 4776f11
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