File: issue0059.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 (29 lines) | stat: -rw-r--r-- 752 bytes parent folder | download | duplicates (4)
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
@issue
Feature: Issue #59 Fatal error when using --format=json

  Using the JSON formatter caused a fatal error.

  Background: Test Setup
    Given a new working directory
    And   a file named "features/steps/steps.py" with:
      """
      from behave import given

      @given(u'passing')
      def step(context):
          pass
      """
    And   a file named "features/issue59_test.feature" with:
      """
      Feature: Passing tagged Scenario
        Scenario: P1
          Given passing
      """

  Scenario: Use the JSONFormatter
    When I run "behave --format=json features/issue59_test.feature"
    Then it should pass with:
      """
      1 feature passed, 0 failed, 0 skipped
      1 scenario passed, 0 failed, 0 skipped
      """