Closed datakurre closed 5 years ago
oh. then the move of the import statement should be reverted with a comment to leave it there. what do you think @datakurre ?
@thet Yes, I also assume that is the easiest solution.
@datakurre this is an interesting side effect and makes me rethink doing any import restructures in tests. It should be fixed now. Closing this issue.
I was wondering, why my pip installed Plone was showing "production mode" even when it was started in foreground mode (
fg
). This was within add-on development setup where the environment also had test packages (so this should never happen in production unless you accidentally include test packages).I traced the issue to this change in plone.testing by @thet where an inline import
from Testing.ZopeTestCase.ZopeLite import _patched as ZOPETESTCASEALERT
was moved with the other imports in file:https://github.com/plone/plone.testing/commit/499e369d55b86b36c5d4bb07082178918afe9108
Because of that change, importing plone.app.testing has side effect of injecting ZopeLite test configuration into global Zope configuration.
As we see below, plone.app.testing gets imported by z3c.autoinclude when it is looking for includable plugins: