Skip to content
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

pytest tests in core #4122

Open
gforcada opened this issue Feb 21, 2025 · 1 comment
Open

pytest tests in core #4122

gforcada opened this issue Feb 21, 2025 · 1 comment

Comments

@gforcada
Copy link
Member

The current status is that the following Python distributions are using pytest tests and are in core:

  • plone.classicui
  • plone.distribution
  • plone.exportimport
  • plone.volto
  • Products.CMFPlacefulWorkflow

That on its own is not good or bad, the problem lies on that these Python distributions are part of Plone core and thus are expected to be tested with the regular Jenkins jobs that ensure no breakages happen across Python distributions (i.e. a change in plone.app.event breaking plone.exportimport).

This is unfortunately not possible if zope.testrunner and pytest tests are mixed.

Possible solutions

  • rewrite the tests in those few distributions to zope.testrunner
  • rewrite ALL other Plone Python distributions to pytest 😅
  • have another separate Jenkins job that ensures those Python distributions tests work with buildout.coredev latest changes

First and second are no fun. Second is more future proof, as we might want to switch eventually to pytest, but it will not happen overnight.

So third looks like the best middle ground, and actually sets the foundation for the 2nd option to happen.

The PR jenkins jobs will be a bit more complicated, as all tests are meant to run within that job.

Opinions?!

@gforcada
Copy link
Member Author

On a buildout.coredev checkout:

make install
.venv/bin/pytest src/plone.volto/tests

Seems to work, I'm not 100% sure that this is using, say the src/Products.CMFPlone git checkout though... I have to go get my kids, I will keep looking at it.

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

No branches or pull requests

1 participant