diff --git a/tests/feature/test_tags.py b/tests/feature/test_tags.py index 0eb24bc0..c4d8a1fe 100644 --- a/tests/feature/test_tags.py +++ b/tests/feature/test_tags.py @@ -30,13 +30,13 @@ def test_tags_selector(testdir): @feature_tag_1 @feature_tag_2 Feature: Tags - @scenario_tag_01 @scenario_tag_02 - Scenario: Tags - Given I have a bar - - @scenario_tag_10 @scenario_tag_20 - Scenario: Tags 2 - Given I have a bar + @scenario_tag_01 @scenario_tag_02 + Scenario: Tags + Given I have a bar + + @scenario_tag_10 @scenario_tag_20 + Scenario: Tags 2 + Given I have a bar """, ) @@ -162,51 +162,6 @@ def i_have_bar(): result.stdout.fnmatch_lines(["*= 1 skipped, 1 xpassed * =*"]) -def test_tag_with_spaces(testdir): - testdir.makefile( - ".ini", - pytest=textwrap.dedent( - """ - [pytest] - markers = - test with spaces - """ - ), - ) - testdir.makeconftest( - """ - import pytest - - @pytest.hookimpl(tryfirst=True) - def pytest_bdd_apply_tag(tag, function): - assert tag == 'test with spaces' - """ - ) - testdir.makefile( - ".feature", - test=""" - Feature: Tag with spaces - - @test with spaces - Scenario: Tags - Given I have a bar - """, - ) - testdir.makepyfile( - """ - from pytest_bdd import given, scenarios - - @given('I have a bar') - def i_have_bar(): - return 'bar' - - scenarios('test.feature') - """ - ) - result = testdir.runpytest_subprocess() - result.stdout.fnmatch_lines(["*= 1 passed * =*"]) - - def test_at_in_scenario(testdir): testdir.makefile( ".feature", diff --git a/tests/test_new_parser.py b/tests/test_new_parser.py index d107c6c8..00eb93a9 100644 --- a/tests/test_new_parser.py +++ b/tests/test_new_parser.py @@ -10,6 +10,7 @@ # - Comments are now only allowed in their own lines. # - "Feature:" line is always required. # - Other changes. Check the modifications to the tests. +# - Tags can only be "valid" identifiers, e.g. no spaces. def test_feature():