Skip to content

Commit ae23da9

Browse files
ProSergsseliverstov
authored andcommitted
fix finalizers after pytest update and remove py33 form supporters pythons (fixes #181 via #183)
1 parent 7269d19 commit ae23da9

File tree

5 files changed

+10
-10
lines changed

5 files changed

+10
-10
lines changed

allure-behave/tox.ini

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[tox]
22
envlist =
3-
py{27,33,34,35}
3+
py{27,34,35}
44
static_check
55

66
[testenv]
@@ -69,4 +69,4 @@ commands = flake8 src/
6969

7070

7171
[flake8]
72-
max-line-length = 120
72+
max-line-length = 120

allure-pytest/src/listener.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -128,10 +128,10 @@ def pytest_fixture_setup(self, fixturedef, request):
128128
stop=now(),
129129
status=get_outcome_status(outcome),
130130
statusDetails=get_outcome_status_details(outcome))
131-
132-
for index, finalizer in enumerate(fixturedef._finalizer or ()):
131+
finalizers = fixturedef._finalizer if hasattr(fixturedef, 'finalizer') else fixturedef._finalizers
132+
for index, finalizer in enumerate(finalizers or ()):
133133
name = '{fixture}::{finalizer}'.format(fixture=fixturedef.argname, finalizer=finalizer.__name__)
134-
fixturedef._finalizer[index] = allure_commons.fixture(finalizer, parent_uuid=container_uuid, name=name)
134+
finalizers[index] = allure_commons.fixture(finalizer, parent_uuid=container_uuid, name=name)
135135

136136
@pytest.hookimpl(hookwrapper=True)
137137
def pytest_fixture_post_finalizer(self, fixturedef):

allure-pytest/tox.ini

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[tox]
22
envlist =
3-
py{27,33,34,35}
3+
py{27,34,35}
44
xdist
55
static_check
66

@@ -64,4 +64,4 @@ commands = flake8 src/
6464

6565

6666
[flake8]
67-
max-line-length = 120
67+
max-line-length = 120

allure-python-commons-test/tox.ini

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
[tox]
2-
envlist = py{27,33,34,35}
2+
envlist = py{27,34,35}
33

44

55
[testenv]

allure-python-commons/tox.ini

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[tox]
22
envlist=
3-
py{27,33,34,35}
3+
py{27,34,35}
44
static_check
55

66

@@ -23,4 +23,4 @@ commands = flake8 src/
2323

2424

2525
[flake8]
26-
max-line-length = 120
26+
max-line-length = 120

0 commit comments

Comments
 (0)