From 9793e3612f28fbd02f44f8aedcc6834236d9baa91e75ff6ccdf7d46d08742e83 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tom=C3=A1=C5=A1=20Chv=C3=A1tal?= Date: Mon, 27 Apr 2020 10:34:28 +0000 Subject: [PATCH] - Update to 3.3.0: * Require at least pytest 4.3 - Remove merged test_flaky.patch OBS-URL: https://build.opensuse.org/package/show/devel:languages:python:pytest/python-pytest-bdd?expand=0&rev=12 --- pytest-bdd-3.2.1.tar.gz | 3 --- pytest-bdd-3.3.0.tar.gz | 3 +++ python-pytest-bdd.changes | 7 +++++++ python-pytest-bdd.spec | 12 ++++++------ test_flaky.patch | 32 -------------------------------- 5 files changed, 16 insertions(+), 41 deletions(-) delete mode 100644 pytest-bdd-3.2.1.tar.gz create mode 100644 pytest-bdd-3.3.0.tar.gz delete mode 100644 test_flaky.patch diff --git a/pytest-bdd-3.2.1.tar.gz b/pytest-bdd-3.2.1.tar.gz deleted file mode 100644 index 47cf423..0000000 --- a/pytest-bdd-3.2.1.tar.gz +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:5c800206053391f0edf784491008ffb1e14a8c2c47103603526ace4202f28228 -size 63938 diff --git a/pytest-bdd-3.3.0.tar.gz b/pytest-bdd-3.3.0.tar.gz new file mode 100644 index 0000000..871b766 --- /dev/null +++ b/pytest-bdd-3.3.0.tar.gz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:2a02fc4edcb0f11e4bf05e22d034e4ab6c79981e6d9f98c530979bb89a14f3c9 +size 65325 diff --git a/python-pytest-bdd.changes b/python-pytest-bdd.changes index c80dea3..19a3b59 100644 --- a/python-pytest-bdd.changes +++ b/python-pytest-bdd.changes @@ -1,3 +1,10 @@ +------------------------------------------------------------------- +Mon Apr 27 10:28:54 UTC 2020 - Tomáš Chvátal + +- Update to 3.3.0: + * Require at least pytest 4.3 +- Remove merged test_flaky.patch + ------------------------------------------------------------------- Mon Apr 20 10:26:57 UTC 2020 - Tomáš Chvátal diff --git a/python-pytest-bdd.spec b/python-pytest-bdd.spec index 31cd6ac..017d3ba 100644 --- a/python-pytest-bdd.spec +++ b/python-pytest-bdd.spec @@ -19,13 +19,12 @@ %{?!python_module:%define python_module() python-%{**} python3-%{**}} %bcond_without python2 Name: python-pytest-bdd -Version: 3.2.1 +Version: 3.3.0 Release: 0 Summary: BDD for pytest License: MIT URL: https://github.com/pytest-dev/pytest-bdd Source: https://github.com/pytest-dev/pytest-bdd/archive/%{version}.tar.gz#/pytest-bdd-%{version}.tar.gz -Patch0: test_flaky.patch BuildRequires: %{python_module setuptools} BuildRequires: fdupes BuildRequires: python-rpm-macros @@ -34,7 +33,7 @@ Requires: python-glob2 Requires: python-parse Requires: python-parse_type Requires: python-py -Requires: python-pytest >= 3.0.0 +Requires: python-pytest >= 4.3.0 Requires: python-six >= 1.9.0 Requires(post): update-alternatives Requires(postun): update-alternatives @@ -46,7 +45,7 @@ BuildRequires: %{python_module glob2} BuildRequires: %{python_module mock} BuildRequires: %{python_module parse_type} BuildRequires: %{python_module parse} -BuildRequires: %{python_module pytest >= 3.0.0} +BuildRequires: %{python_module pytest >= 4.3.0} BuildRequires: %{python_module py} BuildRequires: %{python_module six >= 1.9.0} %if %{with python2} @@ -76,7 +75,6 @@ containing the side effects of the Gherkin imperative declarations. %prep %setup -q -n pytest-bdd-%{version} -%patch0 -p1 sed -i '/tox/d' setup.py %build @@ -89,7 +87,9 @@ sed -i '/tox/d' setup.py %check export LANG=en_US.UTF-8 -%pytest +export PYTHONDONTWRITEBYTECODE=1 +# test_generate_with_quotes and test_unicode_characters require ptyest-bdd binary which we handle with u-a +%pytest -k 'not test_generate_with_quotes and not test_unicode_characters' %post %python_install_alternative pytest-bdd diff --git a/test_flaky.patch b/test_flaky.patch deleted file mode 100644 index 0454c61..0000000 --- a/test_flaky.patch +++ /dev/null @@ -1,32 +0,0 @@ -From 3f1ba96c2de855f96bda04cff8250f8c5a6095ed Mon Sep 17 00:00:00 2001 -From: Florian Bruhin -Date: Wed, 20 Nov 2019 22:19:18 +0100 -Subject: [PATCH] Fix gherkin terminal reporter test flakiness (#340) - -The test compares the output of two different reporters and tries to account for -the different runtime being printed. However, the output format changed with -pytest v5.1.0: - -https://docs.pytest.org/en/latest/changelog.html#id76 - -This changes the regex to be a bit more permissive. ---- - tests/feature/test_gherkin_terminal_reporter.py | 4 ++-- - 1 file changed, 2 insertions(+), 2 deletions(-) - -Index: pytest-bdd-3.2.1/tests/feature/test_gherkin_terminal_reporter.py -=================================================================== ---- pytest-bdd-3.2.1.orig/tests/feature/test_gherkin_terminal_reporter.py -+++ pytest-bdd-3.2.1/tests/feature/test_gherkin_terminal_reporter.py -@@ -166,9 +166,9 @@ def output_must_be_the_same_as_regular_r - assert ghe.ret == 0 - # last line can be different because of test execution time is printed - reg_lines = reg.stdout.lines if reg.stdout.lines[-1] else reg.stdout.lines[:-2] -- reg_lines[-1] = re.sub(r' \d+\.\d+ ', ' X ', reg_lines[-1]) -+ reg_lines[-1] = re.sub(r" in [^=]*", " in X ", reg_lines[-1]) - ghe_lines = ghe.stdout.lines if ghe.stdout.lines[-1] else ghe.stdout.lines[:-2] -- ghe_lines[-1] = re.sub(r' \d+\.\d+ ', ' X ', ghe_lines[-1]) -+ ghe_lines[-1] = re.sub(r" in [^=]*", " in X ", ghe_lines[-1]) - for l1, l2 in zip(reg_lines, ghe_lines): - assert l1 == l2 -