plone / plone.testing

Provides tools for writing unit and integration tests in a Zope and Plone environment. It is not tied to Plone, and it does not depend on Zope 2 (although it has some optional Zope 2-only features)
https://pypi.org/project/plone.testing/
3 stars 9 forks source link

Fix tests when run with ZODB 5.8.1+. #84

Closed mauritsvanrees closed 1 year ago

mauritsvanrees commented 1 year ago

I have updated coredev 6.0 to temporarily extend Zope master versions. But now I see locally that it leads to test failures:

Failure in test /Users/maurits/community/plone-coredev/6.0/src/plone.testing/src/plone/testing/zodb.rst
Failed doctest test for zodb.rst
  File "/Users/maurits/community/plone-coredev/6.0/src/plone.testing/src/plone/testing/zodb.rst", line 0

----------------------------------------------------------------------
File "/Users/maurits/community/plone-coredev/6.0/src/plone.testing/src/plone/testing/zodb.rst", line 55, in zodb.rst
Failed example:
    zodb.EMPTY_ZODB['zodbConnection']
Expected:
    <Connection at ...>
Got:
    <ZODB.Connection.Connection object at 0x1071e7f10>
----------------------------------------------------------------------
File "/Users/maurits/community/plone-coredev/6.0/src/plone.testing/src/plone/testing/zodb.rst", line 138, in zodb.rst
Failed example:
    POPULATED_ZODB['zodbConnection']
Expected:
    <Connection at ...>
Got:
    <ZODB.Connection.Connection object at 0x107256a10>
----------------------------------------------------------------------
File "/Users/maurits/community/plone-coredev/6.0/src/plone.testing/src/plone/testing/zodb.rst", line 233, in zodb.rst
Failed example:
    EXPANDED_ZODB['zodbConnection']
Expected:
    <Connection at ...>
Got:
    <ZODB.Connection.Connection object at 0x107268550>

That will be on Jenkins shortly as well. This PR should fix it.

Note that currently the master branch and 8.x branch of plone.testing are stil the same. The split was probably done by @gforcada when working on the still open PR #82. We should look at that one again soonish.

mister-roboto commented 1 year ago

@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:

@jenkins-plone-org please run jobs

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!

mauritsvanrees commented 1 year ago

@jenkins-plone-org please run jobs