Skip to content

Commit

Permalink
Fix pytester internal plugin to work correctly with latest versions o…
Browse files Browse the repository at this point in the history
…f zope.interface

Fix #1989
  • Loading branch information
nicoddemus committed Jan 19, 2017
1 parent d15724f commit 2574da8
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 13 deletions.
4 changes: 0 additions & 4 deletions .travis.yml
Expand Up @@ -29,10 +29,6 @@ env:
- TESTENV=docs

matrix:
allow_failures:
# see #1989
- env: TESTENV=py27-trial
- env: TESTENV=py35-trial
include:
- env: TESTENV=py36
python: '3.6-dev'
Expand Down
4 changes: 4 additions & 0 deletions CHANGELOG.rst
Expand Up @@ -14,6 +14,9 @@
expected warnings and the list of caught warnings is added to the
error message. Thanks `@lesteve`_ for the PR.

* Fix ``pytester`` internal plugin to work correctly with latest versions of
``zope.interface`` (`#1989`_). Thanks `@nicoddemus`_ for the PR.

* Specifying tests with colons like ``test_foo.py::test_bar`` for tests in
subdirectories with ini configuration files now uses the correct ini file
(`#2148`_). Thanks `@pelme`_.
Expand All @@ -24,6 +27,7 @@
.. _@malinoff: https://github.com/malinoff
.. _@pelme: https://github.com/pelme

.. _#1989: https://github.com/pytest-dev/pytest/issues/1989
.. _#2129: https://github.com/pytest-dev/pytest/issues/2129
.. _#2148: https://github.com/pytest-dev/pytest/issues/2148
.. _#2150: https://github.com/pytest-dev/pytest/issues/2150
Expand Down
6 changes: 3 additions & 3 deletions _pytest/pytester.py
Expand Up @@ -446,9 +446,9 @@ def delete_loaded_modules(self):
the module is re-imported.
"""
for name in set(sys.modules).difference(self._savemodulekeys):
# it seems zope.interfaces is keeping some state
# (used by twisted related tests)
if name != "zope.interface":
# zope.interface (used by twisted-related tests) keeps internal
# state and can't be deleted
if not name.startswith("zope.interface"):
del sys.modules[name]

def make_hook_recorder(self, pluginmanager):
Expand Down
6 changes: 0 additions & 6 deletions appveyor.yml
Expand Up @@ -28,12 +28,6 @@ environment:
- TOXENV: "freeze"
- TOXENV: "docs"

matrix:
allow_failures:
# see #1989
- TOXENV: "py27-trial"
- TOXENV: "py35-trial"

install:
- echo Installed Pythons
- dir c:\Python*
Expand Down

0 comments on commit 2574da8

Please sign in to comment.