Skip to content

Commit

Permalink
Fix tests for PyPy3.
Browse files Browse the repository at this point in the history
On PyPy3 the following `registered_classes` for `IMutableMapping` are
found:

```
{<class 'dict'>,
 <class 'pkg_resources._vendor.pyparsing.ParseResults'>,
 <class 'setuptools._vendor.pyparsing.ParseResults'>,
 <class 'collections.UserDict'>}
```

So collecting the tests fails because of a duplicate name which is
prevented by this commit.
  • Loading branch information
Michael Howitz committed Mar 29, 2022
1 parent 5f8e2e0 commit 239dd56
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/zope/interface/common/tests/__init__.py
Expand Up @@ -60,7 +60,8 @@ def test(self, stdlib_class=stdlib_class, iface=iface):

self.assertTrue(self.verify(iface, stdlib_class))

suffix = "%s_%s_%s" % (
suffix = "%s_%s_%s_%s" % (
stdlib_class.__module__.replace('.', '_'),
stdlib_class.__name__,
iface.__module__.replace('.', '_'),
iface.__name__
Expand Down

0 comments on commit 239dd56

Please sign in to comment.