|
4 | 4 | import pytest
|
5 | 5 |
|
6 | 6 | from pytest_bdd import scenario, given, when, then
|
| 7 | +from tests.utils import get_test_filepath, prepare_feature_and_py_files |
7 | 8 |
|
8 | 9 |
|
9 | 10 | @scenario('gherkin_terminal_reporter.feature',
|
@@ -344,3 +345,22 @@ def output_output_must_contain_parameters_values(test_execution, gherkin_scenari
|
344 | 345 | ghe.stdout.fnmatch_lines('*When I eat {eat} cucumbers'.format(**gherkin_scenario_outline))
|
345 | 346 | ghe.stdout.fnmatch_lines('*Then I should have {left} cucumbers'.format(**gherkin_scenario_outline))
|
346 | 347 | ghe.stdout.fnmatch_lines('*PASSED')
|
| 348 | + |
| 349 | + |
| 350 | +@pytest.mark.parametrize( |
| 351 | + 'feature_file, py_file, name', [ |
| 352 | + ('./steps/unicode.feature', './steps/test_unicode.py', 'test_steps_in_feature_file_have_unicode') |
| 353 | + ] |
| 354 | +) |
| 355 | +def test_scenario_in_expanded_mode(testdir, test_execution, feature_file, py_file, name): |
| 356 | + prepare_feature_and_py_files(testdir, feature_file, py_file) |
| 357 | + |
| 358 | + test_execution['gherkin'] = testdir.runpytest( |
| 359 | + '-k %s' % name, |
| 360 | + '--gherkin-terminal-reporter', |
| 361 | + '--gherkin-terminal-reporter-expanded', |
| 362 | + '-vv', |
| 363 | + ) |
| 364 | + |
| 365 | + ghe = test_execution['gherkin'] |
| 366 | + ghe.assert_outcomes(passed=1) |
0 commit comments