Hello community,
here is the log from the commit of package python-pytest-bdd for
openSUSE:Factory checked in at 2019-07-21 11:33:41
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/python-pytest-bdd (Old)
and /work/SRC/openSUSE:Factory/.python-pytest-bdd.new.4126 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "python-pytest-bdd"
Sun Jul 21 11:33:41 2019 rev:2 rq:716613 version:3.1.1
Changes:
--------
--- /work/SRC/openSUSE:Factory/python-pytest-bdd/python-pytest-bdd.changes
2019-04-02 09:20:34.316614146 +0200
+++
/work/SRC/openSUSE:Factory/.python-pytest-bdd.new.4126/python-pytest-bdd.changes
2019-07-21 11:33:42.632783723 +0200
@@ -1,0 +2,6 @@
+Thu Jul 18 16:50:14 UTC 2019 - Tomáš Chvátal <[email protected]>
+
+- Update to 3.1.1:
+ * Allow unicode string in @given() step names when using python2. This makes
the transition of projects from python 2 to 3 easier.
+
+-------------------------------------------------------------------
Old:
----
pytest-bdd-3.1.0.tar.gz
New:
----
pytest-bdd-3.1.1.tar.gz
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ python-pytest-bdd.spec ++++++
--- /var/tmp/diff_new_pack.9BlFYf/_old 2019-07-21 11:33:43.576783563 +0200
+++ /var/tmp/diff_new_pack.9BlFYf/_new 2019-07-21 11:33:43.576783563 +0200
@@ -12,48 +12,48 @@
# license that conforms to the Open Source Definition (Version 1.9)
# published by the Open Source Initiative.
-# Please submit bugfixes or comments via http://bugs.opensuse.org/
+# Please submit bugfixes or comments via https://bugs.opensuse.org/
+#
%{?!python_module:%define python_module() python-%{**} python3-%{**}}
Name: python-pytest-bdd
-Version: 3.1.0
+Version: 3.1.1
Release: 0
-License: MIT
Summary: BDD for pytest
-Url: https://github.com/pytest-dev/pytest-bdd
+License: MIT
Group: Development/Languages/Python
+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
-BuildRequires: python-rpm-macros
BuildRequires: %{python_module setuptools}
+BuildRequires: fdupes
+BuildRequires: python-rpm-macros
+Requires: python-Mako
+Requires: python-glob2
+Requires: python-parse
+Requires: python-parse_type
+Requires: python-py
+Requires: python-pytest >= 3.0.0
+Requires: python-six >= 1.9.0
+Requires(post): update-alternatives
+Requires(postun): update-alternatives
+BuildArch: noarch
# SECTION test requirements
BuildRequires: %{python_module Mako}
BuildRequires: %{python_module execnet}
BuildRequires: %{python_module glob2}
BuildRequires: %{python_module mock}
-BuildRequires: %{python_module parse}
BuildRequires: %{python_module parse_type}
-BuildRequires: %{python_module py}
+BuildRequires: %{python_module parse}
BuildRequires: %{python_module pytest >= 3.0.0}
BuildRequires: %{python_module pytest-runner}
+BuildRequires: %{python_module py}
BuildRequires: %{python_module six >= 1.9.0}
BuildRequires: python-enum34
# /SECTION
-BuildRequires: fdupes
-Requires: python-glob2
-Requires: python-Mako
-Requires: python-parse
-Requires: python-parse_type
-Requires: python-py
-Requires: python-pytest >= 3.0.0
-Requires: python-six >= 1.9.0
%ifpython2
Requires: python-enum34
%endif
-Requires(post): update-alternatives
-Requires(postun): update-alternatives
-BuildArch: noarch
-
%python_subpackages
%description
++++++ pytest-bdd-3.1.0.tar.gz -> pytest-bdd-3.1.1.tar.gz ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/pytest-bdd-3.1.0/.travis.yml
new/pytest-bdd-3.1.1/.travis.yml
--- old/pytest-bdd-3.1.0/.travis.yml 2019-02-19 14:01:37.000000000 +0100
+++ new/pytest-bdd-3.1.1/.travis.yml 2019-07-08 11:55:49.000000000 +0200
@@ -1,35 +1,12 @@
dist: xenial
language: python
-python: "2.7"
+python:
+ - "2.7"
+ - "3.5"
+ - "3.6"
+ - "3.7"
-matrix:
- include:
- - python: "2.7"
- env: TOXENV=py27-pytestlatest-linters
- - env: TOXENV=py27-pytest33
- - env: TOXENV=py27-pytest34
- - env: TOXENV=py27-pytest35
- - env: TOXENV=py27-pytest36
- - env: TOXENV=py27-pytest37
- - env: TOXENV=py27-pytest38
- - env: TOXENV=py27-pytest39
- - env: TOXENV=py27-pytest310
- - env: TOXENV=py27-pytest40
- - env: TOXENV=py27-pytest41
- - env: TOXENV=py27-pytest42
- - env: TOXENV=py27-pytestlatest
- - env: TOXENV=py27-pytestlatest-xdist
- - env: TOXENV=py34-pytestlatest
- python: "3.4"
- - env: TOXENV=py35-pytestlatest
- python: "3.5"
- - env: TOXENV=py36-pytestlatest
- python: "3.6"
- - env: TOXENV=py37-pytestlatest
- python: "3.7"
- - env: TOXENV=py27-pytestlatest-coveralls
-
-install: pip install tox
+install: pip install tox tox-travis
script: tox --recreate
@@ -39,5 +16,5 @@
notifications:
email:
- - [email protected]
- - [email protected]
+ - [email protected]
+ - [email protected]
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/pytest-bdd-3.1.0/CHANGES.rst
new/pytest-bdd-3.1.1/CHANGES.rst
--- old/pytest-bdd-3.1.0/CHANGES.rst 2019-02-19 14:01:37.000000000 +0100
+++ new/pytest-bdd-3.1.1/CHANGES.rst 2019-07-08 11:55:49.000000000 +0200
@@ -4,6 +4,12 @@
Unreleased
----------
+3.1.1
+----------
+
+- Allow unicode string in ``@given()`` step names when using python2.
+ This makes the transition of projects from python 2 to 3 easier.
+
3.1.0
----------
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/pytest-bdd-3.1.0/README.rst
new/pytest-bdd-3.1.1/README.rst
--- old/pytest-bdd-3.1.0/README.rst 2019-02-19 14:01:37.000000000 +0100
+++ new/pytest-bdd-3.1.1/README.rst 2019-07-08 11:55:49.000000000 +0200
@@ -35,7 +35,7 @@
pip install pytest-bdd
-The minimum required version of pytest is 2.8.1.
+The minimum required version of pytest is 3.3.2
Example
@@ -379,7 +379,7 @@
---------------
As Gherkin, pytest-bdd supports multiline steps
-(aka `PyStrings <http://docs.behat.org/guides/1.gherkin.html#pystrings>`_).
+(aka `PyStrings
<http://behat.org/en/v3.0/user_guide/writing_scenarios.html#pystrings>`_).
But in much cleaner and powerful way:
.. code-block:: gherkin
@@ -482,7 +482,7 @@
Scenarios can be parametrized to cover few cases. In Gherkin the variable
templates are written using corner braces as <somevalue>.
-`Gherkin scenario outlines
<http://docs.behat.org/guides/1.gherkin.html#scenario-outlines>`_ are supported
by pytest-bdd
+`Gherkin scenario outlines
<http://behat.org/en/v3.0/user_guide/writing_scenarios.html#scenario-outlines>`_
are supported by pytest-bdd
exactly as it's described in be behave_ docs.
Example:
@@ -859,7 +859,7 @@
It's often the case that to cover certain feature, you'll need multiple
scenarios. And it's logical that the
setup for those scenarios will have some common parts (if not equal). For
this, there are `backgrounds`.
-pytest-bdd implements `Gherkin backgrounds
<http://docs.behat.org/en/v2.5/guides/1.gherkin.html#backgrounds>`_ for
+pytest-bdd implements `Gherkin backgrounds
<http://behat.org/en/v3.0/user_guide/writing_scenarios.html#backgrounds>`_ for
features.
.. code-block:: gherkin
@@ -974,13 +974,13 @@
----------------------------------
As mentioned above, by default, utf-8 encoding is used for parsing feature
files.
-For steps definition, you can both use unicode- and bytestrings equally.
-However, for argumented steps, if you need to use unicode symbols in it's
regular expression, use `u` sign with regex:
+For steps definition, you should use unicode strings, which is the default in
python 3.
+If you are on python 2, make sure you use unicode strings by prefixing them
with the `u` sign.
.. code-block:: python
- @given(re.compile(u"у мене є рядок який містить
'{0}'".format('(?P<content>.+)')))
+ @given(parsers.re(u"у мене є рядок який містить
'{0}'".format(u'(?P<content>.+)')))
def there_is_a_string_with_content(content, string):
"""Create string with unicode content."""
string['content'] = content
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/pytest-bdd-3.1.0/pytest_bdd/__init__.py
new/pytest-bdd-3.1.1/pytest_bdd/__init__.py
--- old/pytest-bdd-3.1.0/pytest_bdd/__init__.py 2019-02-19 14:01:37.000000000
+0100
+++ new/pytest-bdd-3.1.1/pytest_bdd/__init__.py 2019-07-08 11:55:49.000000000
+0200
@@ -3,6 +3,6 @@
from pytest_bdd.steps import given, when, then
from pytest_bdd.scenario import scenario, scenarios
-__version__ = '3.1.0'
+__version__ = '3.1.1'
__all__ = [given.__name__, when.__name__, then.__name__, scenario.__name__,
scenarios.__name__]
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/pytest-bdd-3.1.0/pytest_bdd/parsers.py
new/pytest-bdd-3.1.1/pytest_bdd/parsers.py
--- old/pytest-bdd-3.1.0/pytest_bdd/parsers.py 2019-02-19 14:01:37.000000000
+0100
+++ new/pytest-bdd-3.1.1/pytest_bdd/parsers.py 2019-07-08 11:55:49.000000000
+0200
@@ -1,22 +1,17 @@
"""Step parsers."""
from __future__ import absolute_import
+
import re as base_re
-import warnings
import parse as base_parse
-from parse_type import cfparse as base_cfparse
-
import six
+from parse_type import cfparse as base_cfparse
from .exceptions import InvalidStepParserError
-RE_TYPE = type(base_re.compile(''))
-
-
class StepParser(object):
-
"""Parser of the individual step."""
def __init__(self, name):
@@ -35,7 +30,6 @@
class re(StepParser):
-
"""Regex step parser."""
def __init__(self, name, *args, **kwargs):
@@ -56,7 +50,6 @@
class parse(StepParser):
-
"""parse step parser."""
def __init__(self, name, *args, **kwargs):
@@ -80,7 +73,6 @@
class cfparse(parse):
-
"""cfparse step parser."""
def __init__(self, name, *args, **kwargs):
@@ -90,7 +82,6 @@
class string(StepParser):
-
"""Exact string step parser."""
def parse_arguments(self, name):
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/pytest-bdd-3.1.0/pytest_bdd/steps.py
new/pytest-bdd-3.1.1/pytest_bdd/steps.py
--- old/pytest-bdd-3.1.0/pytest_bdd/steps.py 2019-02-19 14:01:37.000000000
+0100
+++ new/pytest-bdd-3.1.1/pytest_bdd/steps.py 2019-07-08 11:55:49.000000000
+0200
@@ -85,7 +85,7 @@
step_func.step_type = GIVEN
step_func.converters = converters
- step_func.__name__ = name
+ step_func.__name__ = force_encode(name, 'ascii')
step_func.fixture = fixture
func = pytest.fixture(scope=scope)(lambda: step_func)
func.__doc__ = 'Alias for the "{0}" fixture.'.format(fixture)
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/pytest-bdd-3.1.0/requirements-testing.txt
new/pytest-bdd-3.1.1/requirements-testing.txt
--- old/pytest-bdd-3.1.0/requirements-testing.txt 2019-02-19
14:01:37.000000000 +0100
+++ new/pytest-bdd-3.1.1/requirements-testing.txt 2019-07-08
11:55:49.000000000 +0200
@@ -1,4 +1,4 @@
mock
-pytest-pep8
coverage<4.0a1
pytest-cache
+pycodestyle
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/pytest-bdd-3.1.0/setup.cfg
new/pytest-bdd-3.1.1/setup.cfg
--- old/pytest-bdd-3.1.0/setup.cfg 2019-02-19 14:01:37.000000000 +0100
+++ new/pytest-bdd-3.1.1/setup.cfg 2019-07-08 11:55:49.000000000 +0200
@@ -1,3 +1,5 @@
[wheel]
universal = 1
+[pycodestyle]
+max-line-length = 120
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore'
old/pytest-bdd-3.1.0/tests/feature/gherkin_terminal_reporter.feature
new/pytest-bdd-3.1.1/tests/feature/gherkin_terminal_reporter.feature
--- old/pytest-bdd-3.1.0/tests/feature/gherkin_terminal_reporter.feature
2019-02-19 14:01:37.000000000 +0100
+++ new/pytest-bdd-3.1.1/tests/feature/gherkin_terminal_reporter.feature
2019-07-08 11:55:49.000000000 +0200
@@ -2,46 +2,46 @@
Scenario: Should default output be the same as regular terminal reporter
Given there is gherkin scenario implemented
- When tests are run
+ When I run tests
Then output must be formatted the same way as regular one
Scenario: Should verbose mode enable displaying feature and scenario names
rather than test names in a single line
Given there is gherkin scenario implemented
- When tests are run with verbose mode
+ When I run tests with verbose mode
Then output should contain single line feature description
And output should contain single line scenario description
Scenario: Should verbose mode preserve displaying of regular tests as usual
Given there is non-gherkin scenario implemented
- When tests are run with verbose mode
+ When I run tests with verbose mode
Then output must be formatted the same way as regular one
Scenario: Should double verbose mode enable displaying of full gherkin
scenario description
Given there is gherkin scenario implemented
- When tests are run with very verbose mode
+ When I run tests with very verbose mode
Then output must contain full gherkin scenario description
Scenario: Should error message be displayed when no scenario is found
Given there is gherkin scenario without implementation
- When tests are run with any verbosity mode
+ When I run tests with any verbosity mode
Then output contains error about missing scenario implementation
Scenario: Should error message be displayed when no step is found
Given there is gherkin scenario partially implemented
- When tests are run with any verbosity mode
+ When I run tests with any verbosity mode
Then output contains error about missing step implementation
Scenario: Should error message be displayed when error occurs during test
execution
Given there is gherkin scenario with broken implementation
- When tests are run with any verbosity mode
+ When I run tests with any verbosity mode
Then output contains error about missing scenario implementation
Scenario: Should local variables be displayed when --showlocals option is
used
Given there is gherkin scenario with broken implementation
- When tests are run with --showlocals
+ When I run tests with --showlocals
Then error traceback contains local variable descriptions
Scenario: Should step parameters be replaced by their values
Given there is gherkin scenario outline implemented
- When tests are run with step expanded mode
+ When I run tests with step expanded mode
Then output must contain parameters values
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/pytest-bdd-3.1.0/tests/feature/test_cucumber_json.py
new/pytest-bdd-3.1.1/tests/feature/test_cucumber_json.py
--- old/pytest-bdd-3.1.0/tests/feature/test_cucumber_json.py 2019-02-19
14:01:37.000000000 +0100
+++ new/pytest-bdd-3.1.1/tests/feature/test_cucumber_json.py 2019-07-08
11:55:49.000000000 +0200
@@ -31,6 +31,14 @@
def test_step_trace(testdir):
"""Test step trace."""
+ testdir.makefile(".ini", pytest=textwrap.dedent("""
+ [pytest]
+ markers =
+ scenario-passing-tag
+ scenario-failing-tag
+ scenario-outline-passing-tag
+ feature-tag
+ """))
testdir.makefile('.feature', test=textwrap.dedent("""
@feature-tag
Feature: One passing scenario, one failing scenario
@@ -273,6 +281,12 @@
def test_step_trace_with_expand_option(testdir):
"""Test step trace."""
+ testdir.makefile(".ini", pytest=textwrap.dedent("""
+ [pytest]
+ markers =
+ feature-tag
+ scenario-outline-passing-tag
+ """))
testdir.makefile('.feature', test=textwrap.dedent("""
@feature-tag
Feature: One scenario outline, expanded to multiple scenarios
@@ -299,7 +313,7 @@
def test_passing_outline():
pass
"""))
- result, jsonobject = runandparse(testdir, '--cucumber-json-expand')
+ result, jsonobject = runandparse(testdir, '--cucumber-json-expanded')
assert result.ret == 0
assert jsonobject[0]["elements"][0]["steps"][0]["name"] == "type str and
value hello"
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore'
old/pytest-bdd-3.1.0/tests/feature/test_gherkin_terminal_reporter.py
new/pytest-bdd-3.1.1/tests/feature/test_gherkin_terminal_reporter.py
--- old/pytest-bdd-3.1.0/tests/feature/test_gherkin_terminal_reporter.py
2019-02-19 14:01:37.000000000 +0100
+++ new/pytest-bdd-3.1.1/tests/feature/test_gherkin_terminal_reporter.py
2019-07-08 11:55:49.000000000 +0200
@@ -152,8 +152,8 @@
return example
-@when("tests are run")
-def tests_are_run(testdir, test_execution):
+@when("I run tests")
+def run_tests(testdir, test_execution):
test_execution['regular'] = testdir.runpytest()
test_execution['gherkin'] =
testdir.runpytest('--gherkin-terminal-reporter')
@@ -173,20 +173,20 @@
assert l1 == l2
-@when("tests are run with verbose mode")
-def tests_are_run_with_verbose_mode(testdir, test_execution):
+@when("I run tests with verbose mode")
+def run_tests_with_verbose_mode(testdir, test_execution):
test_execution['regular'] = testdir.runpytest('-v')
test_execution['gherkin'] =
testdir.runpytest('--gherkin-terminal-reporter', '-v')
-@when("tests are run with very verbose mode")
-def tests_are_run_with_very_verbose_mode(testdir, test_execution):
+@when("I run tests with very verbose mode")
+def run_tests_with_very_verbose_mode(testdir, test_execution):
test_execution['regular'] = testdir.runpytest('-vv')
test_execution['gherkin'] =
testdir.runpytest('--gherkin-terminal-reporter', '-vv')
-@when("tests are run with step expanded mode")
-def tests_are_run_with_step_expanded_mode(testdir, test_execution):
+@when("I run tests with step expanded mode")
+def run_tests_with_step_expanded_mode(testdir, test_execution):
test_execution['regular'] = testdir.runpytest('-vv')
test_execution['gherkin'] = testdir.runpytest(
'--gherkin-terminal-reporter',
@@ -238,8 +238,8 @@
""")
-@when('tests are run with any verbosity mode')
-def tests_are_run_with_any_verbosity_mode(
+@when('I run tests with any verbosity mode')
+def run_tests_with_any_verbosity_mode(
test_execution, verbosity_mode, testdir,
gherkin_scenario_without_implementation):
# test_execution['gherkin'] = testdir.runpytest(
@@ -323,8 +323,8 @@
""")
-@when('tests are run with --showlocals')
-def tests_are_run_with___showlocals(test_execution, testdir):
+@when('I run tests with --showlocals')
+def run_tests_with___showlocals(test_execution, testdir):
test_execution['gherkin'] =
testdir.runpytest('--gherkin-terminal-reporter', '--showlocals')
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/pytest-bdd-3.1.0/tests/feature/test_report.py
new/pytest-bdd-3.1.1/tests/feature/test_report.py
--- old/pytest-bdd-3.1.0/tests/feature/test_report.py 2019-02-19
14:01:37.000000000 +0100
+++ new/pytest-bdd-3.1.1/tests/feature/test_report.py 2019-07-08
11:55:49.000000000 +0200
@@ -23,6 +23,13 @@
def test_step_trace(testdir):
"""Test step trace."""
+ testdir.makefile(".ini", pytest=textwrap.dedent("""
+ [pytest]
+ markers =
+ feature-tag
+ scenario-passing-tag
+ scenario-failing-tag
+ """))
feature = testdir.makefile('.feature', test=textwrap.dedent("""
@feature-tag
Feature: One passing scenario, one failing scenario
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/pytest-bdd-3.1.0/tests/feature/test_reuse.py
new/pytest-bdd-3.1.1/tests/feature/test_reuse.py
--- old/pytest-bdd-3.1.0/tests/feature/test_reuse.py 2019-02-19
14:01:37.000000000 +0100
+++ new/pytest-bdd-3.1.1/tests/feature/test_reuse.py 2019-07-08
11:55:49.000000000 +0200
@@ -21,6 +21,7 @@
empty_list.append(1)
return empty_list
+
given('I have a fixture (appends 1 to a list) in reuse syntax',
fixture='appends_1')
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/pytest-bdd-3.1.0/tests/feature/test_tags.py
new/pytest-bdd-3.1.1/tests/feature/test_tags.py
--- old/pytest-bdd-3.1.0/tests/feature/test_tags.py 2019-02-19
14:01:37.000000000 +0100
+++ new/pytest-bdd-3.1.1/tests/feature/test_tags.py 2019-07-08
11:55:49.000000000 +0200
@@ -1,25 +1,23 @@
"""Test tags."""
-import pytest
-
-from pytest_bdd import scenario, feature
+import textwrap
+import pytest
-def test_tags(request):
- """Test tags for the scenario and the feature."""
- @scenario(
- 'tags.feature',
- 'Tags'
- )
- def test():
- pass
-
- assert test.__scenario__.tags == set(['scenario_tag_1', 'scenario_tag_2'])
- assert test.__scenario__.feature.tags == set(['feature_tag_1',
'feature_tag_2'])
- test(request)
+from pytest_bdd import feature
def test_tags_selector(testdir):
"""Test tests selection by tags."""
+ testdir.makefile(".ini", pytest=textwrap.dedent("""
+ [pytest]
+ markers =
+ feature_tag_1
+ feature_tag_2
+ scenario_tag_01
+ scenario_tag_02
+ scenario_tag_10
+ scenario_tag_20
+ """))
testdir.makefile('.feature', test="""
@feature_tag_1 @feature_tag_2
Feature: Tags
@@ -43,9 +41,10 @@
scenarios('test.feature')
""")
- result = testdir.runpytest('-m', 'scenario_tag_10 and not
scenario_tag_01', '-vv').parseoutcomes()
- assert result['passed'] == 1
- assert result['deselected'] == 1
+ result = testdir.runpytest('-m', 'scenario_tag_10 and not
scenario_tag_01', '-vv')
+ outcomes = result.parseoutcomes()
+ assert outcomes['passed'] == 1
+ assert outcomes['deselected'] == 1
result = testdir.runpytest('-m', 'scenario_tag_01 and not
scenario_tag_10', '-vv').parseoutcomes()
assert result['passed'] == 1
@@ -60,6 +59,10 @@
def test_tags_after_background_issue_160(testdir):
"""Make sure using a tag after background works."""
+ testdir.makefile(".ini", pytest=textwrap.dedent("""
+ [pytest]
+ markers = tag
+ """))
testdir.makefile('.feature', test="""
Feature: Tags after background
@@ -132,6 +135,11 @@
def test_tag_with_spaces(testdir):
+ testdir.makefile(".ini", pytest=textwrap.dedent("""
+ [pytest]
+ markers =
+ test with spaces
+ """))
testdir.makeconftest("""
import pytest
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/pytest-bdd-3.1.0/tests/steps/test_unicode.py
new/pytest-bdd-3.1.1/tests/steps/test_unicode.py
--- old/pytest-bdd-3.1.0/tests/steps/test_unicode.py 2019-02-19
14:01:37.000000000 +0100
+++ new/pytest-bdd-3.1.1/tests/steps/test_unicode.py 2019-07-08
11:55:49.000000000 +0200
@@ -33,6 +33,9 @@
return {'content': ''}
+given(u"I have an alias with a unicode type for foo", fixture="foo")
+
+
@given(parsers.parse(u"у мене є рядок який містить '{content}'"))
def there_is_a_string_with_content(content, string):
"""Create string with unicode content."""
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/pytest-bdd-3.1.0/tests/steps/unicode.feature
new/pytest-bdd-3.1.1/tests/steps/unicode.feature
--- old/pytest-bdd-3.1.0/tests/steps/unicode.feature 2019-02-19
14:01:37.000000000 +0100
+++ new/pytest-bdd-3.1.1/tests/steps/unicode.feature 2019-07-08
11:55:49.000000000 +0200
@@ -7,3 +7,7 @@
Scenario: Steps in .py file have unicode
Given there is an other string with content 'якийсь контент'
Then I should see that the other string equals to content 'якийсь
контент'
+
+ Scenario: Given names have unicode types
+ Given I have an alias with a unicode type for foo
+ Then foo should be "foo"
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/pytest-bdd-3.1.0/tox.ini new/pytest-bdd-3.1.1/tox.ini
--- old/pytest-bdd-3.1.0/tox.ini 2019-02-19 14:01:37.000000000 +0100
+++ new/pytest-bdd-3.1.1/tox.ini 2019-07-08 11:55:49.000000000 +0200
@@ -1,33 +1,39 @@
[tox]
-distshare={homedir}/.tox/distshare
-envlist=py27-pytestlatest-linters,py27-pytest{33,34,35,36,37,38,39,310,40,41,42,latest},py{34,35,36,37}-pytestlatest,py27-pytestlatest-xdist
+distshare = {homedir}/.tox/distshare
+envlist = py27-pytestlatest-linters,
+ py27-pytest{36,37,38,39,310,4,41,42,43,44,45,46},
+ py37-pytest{36,37,38,39,310,4,41,42,43,44,45,46,5,latest},
+ py{35,36}-pytestlatest,
+ py27-pytestlatest-xdist
skip_missing_interpreters = true
[testenv]
deps =
pytestlatest: pytest
+ pytest5: pytest~=5.0.0
+ pytest46: pytest~=4.6.0
+ 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
- pytest40: pytest~=4.0.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
- pytest35: pytest~=3.5.0
- pytest34: pytest~=3.4.0
- pytest33: pytest~=3.3.2
-r{toxinidir}/requirements-testing.txt
commands = py.test tests --junitxml={envlogdir}/junit-{envname}.xml
[testenv:py27-pytestlatest-linters]
-commands={[testenv]commands} pytest_bdd --pep8 -m pep8
+commands = pycodestyle pytest_bdd tests
[testenv:py27-pytestlatest-xdist]
deps =
pytest-xdist
{[testenv]deps}
-commands={[testenv]commands} -n3 -rfsxX
+commands = {[testenv]commands} -n3 -rfsxX
[testenv:py27-pytestlatest-coveralls]
passenv = TRAVIS TRAVIS_JOB_ID TRAVIS_BRANCH
@@ -36,7 +42,7 @@
deps =
{[testenv]deps}
coveralls
-commands=
+commands =
coverage run --branch --source=pytest_bdd {envbindir}/pytest tests
coverage report -m
coveralls