Skip to content

Commit 9dc09bc

Browse files
hugovkyoutux
authored andcommitted
Fix for Python 4 and drop support for pytest < 4.3 (#332)
* Fix for Python 4 * Drop support for pytest < 4.3 * Update changelog and authors
1 parent d26411f commit 9dc09bc

File tree

6 files changed

+8
-18
lines changed

6 files changed

+8
-18
lines changed

AUTHORS.rst

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@ These people have contributed to `pytest-bdd`, in alphabetical order:
1818
* `Florian Bruhin <[email protected]>`_
1919
* `Floris Bruynooghe <[email protected]>`_
2020
* `Harro van der Klauw <[email protected]>`_
21+
* `Hugo van Kemenade <https://github.com/hugovk>`_
2122
* `Laurence Rowe <[email protected]>`_
2223
* `Leonardo Santagada <[email protected]>`_
2324
* `Milosz Sliwinski <sliwinski-milosz>`_

CHANGES.rst

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,8 @@ Changelog
44
Unreleased
55
----------
66

7+
- Drop support for pytest < 4.3.
8+
- Fix a Python 4.0 bug.
79
- Fix ``pytest --generate-missing`` functionality being broken.
810
- Drop compatibility with pytest < 3.6
911

README.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ Install pytest-bdd
3535
pip install pytest-bdd
3636

3737

38-
The minimum required version of pytest is 3.3.2
38+
The minimum required version of pytest is 4.3.
3939

4040

4141
Example

pytest_bdd/cucumber_json.py

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -7,13 +7,8 @@
77
import sys
88
import time
99

10-
import six
11-
1210
from .feature import force_unicode
1311

14-
if six.PY3:
15-
long = int
16-
1712

1813
def add_options(parser):
1914
"""Add pytest-bdd options."""
@@ -80,7 +75,7 @@ def _get_result(self, step, report, error_message=False):
8075
result = {"status": "failed", "error_message": force_unicode(report.longrepr) if error_message else ""}
8176
elif report.skipped:
8277
result = {"status": "skipped"}
83-
result["duration"] = long(math.floor((10 ** 9) * step["duration"])) # nanosec
78+
result["duration"] = int(math.floor((10 ** 9) * step["duration"])) # nanosec
8479
return result
8580

8681
def _serialize_tags(self, item):

setup.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@
4444
"Programming Language :: Python :: 3",
4545
]
4646
+ [("Programming Language :: Python :: %s" % x) for x in "2.7 3.5 3.6 3.7 3.8".split()],
47-
install_requires=["glob2", "Mako", "parse", "parse_type", "py", "pytest>=3.6.0", "six>=1.9.0"],
47+
install_requires=["glob2", "Mako", "parse", "parse_type", "py", "pytest>=4.3", "six>=1.9.0"],
4848
# the following makes a plugin available to py.test
4949
entry_points={
5050
"pytest11": ["pytest-bdd = pytest_bdd.plugin"],

tox.ini

Lines changed: 2 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
[tox]
22
distshare = {homedir}/.tox/distshare
33
envlist = py37-pytestlatest-linters,
4-
py27-pytest{36,37,38,39,310,4,41,42,43,44,45,46}-coverage,
5-
py37-pytest{36,37,38,39,310,4,41,42,43,44,45,46,5,51,latest}-coverage,
4+
py27-pytest{43,44,45,46}-coverage,
5+
py37-pytest{43,44,45,46,5,51,latest}-coverage,
66
py{35,36,38}-pytestlatest-coverage,
77
py27-pytestlatest-xdist-coverage
88
skip_missing_interpreters = true
@@ -19,14 +19,6 @@ deps =
1919
pytest45: pytest~=4.5.0
2020
pytest44: pytest~=4.4.0
2121
pytest43: pytest~=4.3.0
22-
pytest42: pytest~=4.2.0
23-
pytest41: pytest~=4.1.0
24-
pytest4: pytest~=4.0.0
25-
pytest310: pytest~=3.10.0
26-
pytest39: pytest~=3.9.0
27-
pytest38: pytest~=3.8.0
28-
pytest37: pytest~=3.7.0
29-
pytest36: pytest~=3.6.0
3022

3123
coverage: coverage
3224
xdist: pytest-xdist

0 commit comments

Comments
 (0)