Debian Codegraph @

issue.features/issue0072.feature

raw
1 @issue
2 Feature: Issue #72: Using 'GHERKIN_COLORS' fails with Exception
3
4 > Trying: GHERKIN_COLORS=executing=white behave
5 > It fails:
6 >
7 > Traceback (most recent call last):
8 > ...
9 > File "/.../behave/formatter/ansi_escapes.py", line 38, in <module>
10 > escapes[alias] = ''.join([colors[c] for c in aliases[alias].split(',')])
11 > TypeError: list indices must be integers, not str
12 >
13 > The reason is that the global variable colors is defined twice in this module.
14 > The second variable overrides/modifies the first (without intention).
15
16
17 Scenario: Using GHERKIN_COLORS in new working dir
18 Given a new working directory
19 And I set the environment variable "GHERKIN_COLORS" to "executing=white"
20 When I run "behave"
21 Then it should fail with:
22 """
23 No steps directory in '{__WORKDIR__}/features'
24 """
25 But the command output should not contain:
26 """
27 Traceback (most recent call last):
28 """
29 And the command output should not contain:
30 """
31 TypeError: list indices must be integers, not str
32 """