I have a complex Plone add-on where we have a lot of Python code (unrelated to Zope or Plone) which has tons of tests which are tested using `pytest`. For some Plone tests or integration tests, we have some tests which run under control of `zope.testrunner`. Is there some way to integrate zope.testrunner and related tests under the control of `pytest`?
I don’t know whether the use case is exactly the same, but my 2 cents:
Lately, I have been working on updating bobtemplates.plone to work with templates created by cookieplone-templates.
In cookieplone-templates based add-ons, the initial test setup and the make test command are based on pytest while the bobtemplates.plone templates generated tests are based in unittest and plone.app.testing.
I found that pointing pytest to the tests folder of my add-on, just runs the plone.app.testing based tests correctly. So I run the following command, where dantzan is the name of my add-on:
$ pytest src/dantzan/tests
In my test dependencies, I have pytest-plone which depends on zope.pytestlayer which I think does the work of integrating those tests with pytest.