File: issue0476.feature

package info (click to toggle)
behave 1.2.6-6
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 4,160 kB
  • sloc: python: 19,857; makefile: 137; sh: 18
file content (39 lines) | stat: -rw-r--r-- 1,162 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
@issue
Feature: Issue #467 -- Scenario status when scenario w/o steps is skipped

  . The scenario.status should be "skipped"
  . if you try to skip a scenario without any steps.


    Scenario: Skip scenario without steps
      Given a new working directory
      And a file named "features/steps/pass_steps.py" with:
        """
        from behave import step

        @step('{word:w} step passes')
        def step_passes(context, word):
            pass
        """
      And a file named "features/without_steps.feature" with:
        """
        Feature:
          @skip_this
          Scenario: Without steps
        """
      And a file named "features/environment.py" with:
        """
        def before_scenario(context, scenario):
            if "skip_this" in scenario.tags:
                scenario.skip()
        """
      When I run "behave -f plain features/without_steps.feature"
      Then it should pass with:
        """
        Feature:
          Scenario: Without steps

        0 features passed, 0 failed, 1 skipped
        0 scenarios passed, 0 failed, 1 skipped
        """
      But note that "the scenario without steps is skipped"