Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Ensure compatibility with pytest 5.4.2 #9

Merged
merged 2 commits into from
May 15, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
3 changes: 2 additions & 1 deletion CHANGES.rst
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,8 @@ Change log for gocept.pytestlayer
6.3 (unreleased)
================

- Nothing changed yet.
- Ensure compatibility with pytest > 5.4.2. We need a
``_explicit_tearDown`` on our ``LayeredTestCaseFunction`` now.


6.2 (2020-03-20)
Expand Down
12 changes: 10 additions & 2 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,16 @@
name='gocept.pytestlayer',
version='6.3.dev0',

python_requires=', '.join([
'>=2.7',
'!=3.0.*',
'!=3.1.*',
'!=3.2.*',
'!=3.3.*',
'!=3.4.*',
]),
install_requires=[
'pytest>=3.0',
'pytest',
'setuptools',
'six',
'zope.dottedname',
Expand All @@ -32,7 +40,7 @@
author='gocept <mail@gocept.com>',
author_email='mail@gocept.com',
license='ZPL 2.1',
url='https://bitbucket.org/gocept/gocept.pytestlayer/',
url='https://github.com/gocept/gocept.pytestlayer/',

keywords='pytest py.test zope.testrunner layer fixture',
classifiers="""\
Expand Down
3 changes: 2 additions & 1 deletion src/gocept/pytestlayer/layered.py
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,8 @@ def __init__(self, name, parent):
def setup(self):
# This is actually set in the base class, but as we want to modify
# `self._request` in our way, we do not make a super call here.
self._needs_explicit_tearDown = False
# It has to be None or a bound method to be called during tearDown.
self._explicit_tearDown = None
if hasattr(self, "_request"):
# call function fixture (testSetUp)
fixture_name = fixture.get_fixture_name(
Expand Down
2 changes: 1 addition & 1 deletion tox.ini
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ setenv =
extras = test
deps =
py{27,py}: pytest < 5.0
py{35,36,37,38,py3}: pytest != 5.3.4, != 5.3.3
py{35,36,37,38,py3}: pytest >= 5.4.2
pytest-cov
pytest-flake8
py{35,36,37,38,py3}: pytest-remove-stale-bytecode
Expand Down