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
This commit is contained in:
parent
d26411fe2e
commit
9dc09bcd06
|
@ -18,6 +18,7 @@ These people have contributed to `pytest-bdd`, in alphabetical order:
|
|||
* `Florian Bruhin <me@the-compiler.org>`_
|
||||
* `Floris Bruynooghe <flub@devork.be>`_
|
||||
* `Harro van der Klauw <hvdklauw@gmail.com>`_
|
||||
* `Hugo van Kemenade <https://github.com/hugovk>`_
|
||||
* `Laurence Rowe <l@lrowe.co.uk>`_
|
||||
* `Leonardo Santagada <santagada@github.com>`_
|
||||
* `Milosz Sliwinski <sliwinski-milosz>`_
|
||||
|
|
|
@ -4,6 +4,8 @@ Changelog
|
|||
Unreleased
|
||||
----------
|
||||
|
||||
- Drop support for pytest < 4.3.
|
||||
- Fix a Python 4.0 bug.
|
||||
- Fix ``pytest --generate-missing`` functionality being broken.
|
||||
- Drop compatibility with pytest < 3.6
|
||||
|
||||
|
|
|
@ -35,7 +35,7 @@ Install pytest-bdd
|
|||
pip install pytest-bdd
|
||||
|
||||
|
||||
The minimum required version of pytest is 3.3.2
|
||||
The minimum required version of pytest is 4.3.
|
||||
|
||||
|
||||
Example
|
||||
|
|
|
@ -7,13 +7,8 @@ import os
|
|||
import sys
|
||||
import time
|
||||
|
||||
import six
|
||||
|
||||
from .feature import force_unicode
|
||||
|
||||
if six.PY3:
|
||||
long = int
|
||||
|
||||
|
||||
def add_options(parser):
|
||||
"""Add pytest-bdd options."""
|
||||
|
@ -80,7 +75,7 @@ class LogBDDCucumberJSON(object):
|
|||
result = {"status": "failed", "error_message": force_unicode(report.longrepr) if error_message else ""}
|
||||
elif report.skipped:
|
||||
result = {"status": "skipped"}
|
||||
result["duration"] = long(math.floor((10 ** 9) * step["duration"])) # nanosec
|
||||
result["duration"] = int(math.floor((10 ** 9) * step["duration"])) # nanosec
|
||||
return result
|
||||
|
||||
def _serialize_tags(self, item):
|
||||
|
|
2
setup.py
2
setup.py
|
@ -44,7 +44,7 @@ setup(
|
|||
"Programming Language :: Python :: 3",
|
||||
]
|
||||
+ [("Programming Language :: Python :: %s" % x) for x in "2.7 3.5 3.6 3.7 3.8".split()],
|
||||
install_requires=["glob2", "Mako", "parse", "parse_type", "py", "pytest>=3.6.0", "six>=1.9.0"],
|
||||
install_requires=["glob2", "Mako", "parse", "parse_type", "py", "pytest>=4.3", "six>=1.9.0"],
|
||||
# the following makes a plugin available to py.test
|
||||
entry_points={
|
||||
"pytest11": ["pytest-bdd = pytest_bdd.plugin"],
|
||||
|
|
12
tox.ini
12
tox.ini
|
@ -1,8 +1,8 @@
|
|||
[tox]
|
||||
distshare = {homedir}/.tox/distshare
|
||||
envlist = py37-pytestlatest-linters,
|
||||
py27-pytest{36,37,38,39,310,4,41,42,43,44,45,46}-coverage,
|
||||
py37-pytest{36,37,38,39,310,4,41,42,43,44,45,46,5,51,latest}-coverage,
|
||||
py27-pytest{43,44,45,46}-coverage,
|
||||
py37-pytest{43,44,45,46,5,51,latest}-coverage,
|
||||
py{35,36,38}-pytestlatest-coverage,
|
||||
py27-pytestlatest-xdist-coverage
|
||||
skip_missing_interpreters = true
|
||||
|
@ -19,14 +19,6 @@ deps =
|
|||
pytest45: pytest~=4.5.0
|
||||
pytest44: pytest~=4.4.0
|
||||
pytest43: pytest~=4.3.0
|
||||
pytest42: pytest~=4.2.0
|
||||
pytest41: pytest~=4.1.0
|
||||
pytest4: pytest~=4.0.0
|
||||
pytest310: pytest~=3.10.0
|
||||
pytest39: pytest~=3.9.0
|
||||
pytest38: pytest~=3.8.0
|
||||
pytest37: pytest~=3.7.0
|
||||
pytest36: pytest~=3.6.0
|
||||
|
||||
coverage: coverage
|
||||
xdist: pytest-xdist
|
||||
|
|
Loading…
Reference in New Issue