File tree Expand file tree Collapse file tree 1 file changed +35
-0
lines changed Expand file tree Collapse file tree 1 file changed +35
-0
lines changed Original file line number Diff line number Diff line change @@ -620,3 +620,38 @@ def _(stuff):
620
620
"*Tearing down...*" ,
621
621
]
622
622
)
623
+
624
+
625
+ def test_right_aligned_steps (pytester ):
626
+ """Using the same given fixture raises an error."""
627
+ pytester .makefile (
628
+ ".feature" ,
629
+ right_aligned_steps = textwrap .dedent (
630
+ """\
631
+ Feature: Non-standard step indentation
632
+ Scenario: Indent my steps
633
+ Given I indent with 4 spaces
634
+ Then I indent with 5 spaces to line up
635
+ """
636
+ ),
637
+ )
638
+ pytester .makepyfile (
639
+ textwrap .dedent (
640
+ """\
641
+ from pytest_bdd import given, then, scenarios
642
+
643
+ scenarios("right_aligned_steps.feature")
644
+
645
+ @given("I indent with 4 spaces")
646
+ def _():
647
+ pass
648
+
649
+ @then("I indent with 5 spaces to line up")
650
+ def _():
651
+ pass
652
+
653
+ """
654
+ )
655
+ )
656
+ result = pytester .runpytest ()
657
+ result .assert_outcomes (passed = 1 , failed = 0 )
You can’t perform that action at this time.
0 commit comments