Fix tests now that setuptools 82 is out.#46
Conversation
We require Python 3.10+.
Get rid of arcane incantations in test_loader.py.
Now that we have removed the arcane setup code from test_loader.py, we need to have all test-packages installed already.
This explicitly uses `setuptools<82` as `build-system`, otherwise the `pkg_resources` module is not available. I want to be able to test that these kinds of packages are also found.
Otherwise the tests fail, because neither pip nor buildout can handle the combination of namespace package styles in development. Alternatively we could add `horse-with-no-namespace`. I tried and it works. But I prefer not to rely on it in these tests.
Our setup is too different to use the standard one from plone.meta.
|
@mauritsvanrees thanks for creating this Pull Request and helping to improve Plone! TL;DR: Finish pushing changes, pass all other checks, then paste a comment: To ensure that these changes do not break other parts of Plone, the Plone test suite matrix needs to pass, but it takes 30-60 min. Other CI checks are usually much faster and the Plone Jenkins resources are limited, so when done pushing changes and all other checks pass either start all Jenkins PR jobs yourself, or simply add the comment above in this PR to start all the jobs automatically. Happy hacking! |
|
This works, but we should remove the test matrix and just rely on our own config. But that requires some work in |
We need our test-packages installed, due to the recent changes in `test_loader.py`. We don't have many dependencies, so using the dist.plone.org constraints would not bring us much either. These are installed in a tox env: ``` setuptools==82.0.0 zope-configuration==7.0 zope-event==6.1 zope-exceptions==6.0 zope-i18nmessageid==8.2 zope-interface==8.2 zope-schema==8.1 zope-testrunner==8.2 ```
We have our `owncoverage` job for this.
When false, don't use the test matrix. I use this option in plone/plone.autoinclude#46 in commit f825429a04ba060a9209ed7447f5e5429993f605. See failing tests at https://github.com/plone/plone.autoinclude/actions/runs/21947076544 when using the test matrix.
|
Done, all green. Jenkins is not needed: the |
In PR #44 the unit/integration two weeks ago the tests passed:
https://github.com/plone/plone.autoinclude/actions/runs/21561303563
I merged that PR yesterday, and then they failed:
https://github.com/plone/plone.autoinclude/actions/runs/21924186549
This is because
setuptools82 is out, withoutpkg_resources.Overview of changes:
pkg_resources(withsetuptools<82asbuild-system) and one withpkgutilstyle namespaces.distutilscode intest_loader.py.owncoveragetox env instead of the standardcoverageenv from plone.meta, as our setup is too different.