File: issue0606.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 (53 lines) | stat: -rw-r--r-- 1,380 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
40
41
42
43
44
45
46
47
48
49
50
51
52
53
@issue
Feature: Issue #606 -- Name option with special unicode chars


  Background:
    Given a new working directory
    And a file named "features/alice.feature" with:
      """
      Feature: Alice

        Scenario: Ärgernis ist überall
          Given a step passes

        Scenario: My second Ärgernis
          When another step passes

        Scenario: Unused
          Then some step passes
      """
    And a file named "features/steps/passing_steps.py" with:
      """
      from behave import step

      @step(u'{word:w} step passes')
      def step_passes(context, word):
          pass
      """
    And a file named "behave.ini" with:
      """
      [behave]
      show_timings = false
      """

  Scenario: Use special unicode chars in --name options
    When  I run "behave -f plain --name Ärgernis features/"
    Then it should pass with:
      """
      1 feature passed, 0 failed, 0 skipped
      2 scenarios passed, 0 failed, 1 skipped
      2 steps passed, 0 failed, 1 skipped, 0 undefined
      """
    And the command output should contain:
      """
      Scenario: Ärgernis ist überall
        Given a step passes ... passed

      Scenario: My second Ärgernis
        When another step passes ... passed
      """
    But the command output should not contain:
      """
      UnicodeDecodeError: 'ascii' codec can't decode byte
      """