forked from pool/python-pytest-bdd
- 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
This commit is contained in:
committed by
Git OBS Bridge
parent
ced12d5267
commit
9793e3612f
@@ -1,3 +0,0 @@
|
||||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:5c800206053391f0edf784491008ffb1e14a8c2c47103603526ace4202f28228
|
||||
size 63938
|
||||
3
pytest-bdd-3.3.0.tar.gz
Normal file
3
pytest-bdd-3.3.0.tar.gz
Normal file
@@ -0,0 +1,3 @@
|
||||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:2a02fc4edcb0f11e4bf05e22d034e4ab6c79981e6d9f98c530979bb89a14f3c9
|
||||
size 65325
|
||||
@@ -1,3 +1,10 @@
|
||||
-------------------------------------------------------------------
|
||||
Mon Apr 27 10:28:54 UTC 2020 - Tomáš Chvátal <tchvatal@suse.com>
|
||||
|
||||
- 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 <tchvatal@suse.com>
|
||||
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -1,32 +0,0 @@
|
||||
From 3f1ba96c2de855f96bda04cff8250f8c5a6095ed Mon Sep 17 00:00:00 2001
|
||||
From: Florian Bruhin <me@the-compiler.org>
|
||||
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
|
||||
|
||||
Reference in New Issue
Block a user