Created
August 8, 2020 11:43
-
-
Save erik-smit/c36c87b45c23948da7fd1697e7344020 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
=============================================================================== short test summary info ================================================================================ | |
FAILED unit_tests/test_scenario_outline.py::test_a_flat_scenario[foo] - AssertionError: assert '<varname>' == 'foo' | |
FAILED unit_tests/test_scenario_outline.py::test_a_flat_scenario[bar] - AssertionError: assert '<varname>' == 'foo' | |
FAILED unit_tests/test_scenario_outline.py::test_a_flat_scenario[baz] - AssertionError: assert '<varname>' == 'foo' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Feature: Scenario Outlines | |
Scenario Outline: A flat scenario | |
Given Some scenario with variable <varname> | |
Then It should be the right thing | |
Examples: | |
| varname | | |
| foo | | |
| bar | | |
| baz | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import struct | |
from pytest_bdd import given, parsers, scenarios, then, when | |
scenarios("test_scenario_outline.feature") | |
@given(parsers.parse("Some scenario with variable {varname}")) | |
def some_scenario(context, varname): | |
context.block = varname | |
@then("It should be the right thing") | |
def it_should_be_the_right_thing(context): | |
assert context.block == "foo" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment