Skip to content

Commit

Permalink
Merge pull request #145 from zopefoundation/issue144
Browse files Browse the repository at this point in the history
Fix a test failure against zope.interface5 due to overly specific exception tests.
  • Loading branch information
jamadden committed Mar 26, 2020
2 parents 180982b + e138d04 commit 005b46c
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 6 deletions.
3 changes: 2 additions & 1 deletion CHANGES.rst
Expand Up @@ -4,7 +4,8 @@
4.6.4 (unreleased)
------------------

- Nothing changed yet.
- Fix an overly specific test failure using zope.interface 5. See
`issue 144 <https://github.com/zopefoundation/persistent/issues/144>`_.


4.6.3 (2020-03-18)
Expand Down
10 changes: 5 additions & 5 deletions persistent/tests/test_picklecache.py
Expand Up @@ -1124,13 +1124,13 @@ def test_inst_does_not_conform_to_IExtendedPickleCache(self):
# interface declaration to the C implementation.
from persistent.interfaces import IExtendedPickleCache
from zope.interface.verify import verifyObject
from zope.interface.exceptions import DoesNotImplement
from zope.interface.exceptions import BrokenImplementation
from zope.interface.exceptions import Invalid
# We don't claim to implement it.
with self.assertRaises(DoesNotImplement):
verifyObject(IExtendedPickleCache, self._makeOne())
self.assertFalse(IExtendedPickleCache.providedBy(self._makeOne()))
# And we don't even provide everything it asks for.
with self.assertRaises(BrokenImplementation):
# (Exact error depends on version of zope.interface and what we
# fail to implement. 5.0 probably raises MultipleInvalid).
with self.assertRaises(Invalid):
verifyObject(IExtendedPickleCache, self._makeOne(), tentative=True)

def test___setitem___persistent_class(self):
Expand Down

0 comments on commit 005b46c

Please sign in to comment.