You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Four bug fixes discovered during pytest-beehave e2e integration:
1. ScenarioInfo.steps now includes background steps (was only scenario steps)
2. check_all uses rglob() to find features in subdirectories
3. generate_stubs creates __init__.py in generated directories
4. Function names are lowercased, matching path slug behavior
Adds 9 new tests. Updates spec and README to document lowercasing.
Copy file name to clipboardExpand all lines: README.md
+1-1Lines changed: 1 addition & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -192,7 +192,7 @@ Warnings exit 0. Errors exit 1. Stubs (bodies with only `pass` or `...`) skip bo
192
192
193
193
## How it maps
194
194
195
-
-**Scenario title → function name:**`Honey Production From Nectar` → `test_honey_production_from_nectar`. Globally unique across all features.
195
+
-**Scenario title → function name:**`Honey Production From Nectar` → `test_honey_production_from_nectar`. Lowercased. Globally unique across all features.
196
196
-**Rule → test file:** Top-level scenarios go to `default_test.py`. Scenarios inside a Rule go to `<rule>_test.py`.
197
197
-**Feature title → directory:**`Hive Activity` → `tests/features/hive_activity/`.
198
198
-**Strategy inference:** Examples table column values are typed — all integers → `st.integers()`, all floats → `st.floats()`, all booleans → `st.booleans()`, else → `st.text()`.
Scenario: extra spaces here → test_extra_spaces_here
76
+
Scenario: Add Single Item → test_add_single_item
75
77
```
76
78
77
79
No `@scenario` decorator. No `@id` tags. No cache file. At collection time, beehave re-parses all `.feature` files and AST-parses all test files, then joins on function name.
@@ -80,7 +82,7 @@ No `@scenario` decorator. No `@id` tags. No cache file. At collection time, beeh
80
82
81
83
-**Characters:** Unicode letters, digits, and spaces only. Applies to Scenario, Scenario Outline, Feature, and Rule titles equally. Special characters would break generated file paths or Python identifiers.
82
84
-**Non-empty:** The title must be non-empty after trimming.
83
-
-**Scenario titles:** Globally unique across all features. Two scenario titles that collapse to the same function name produce a parse error.
85
+
-**Scenario titles:** Globally unique across all features. Two scenario titles that collapse to the same function name (case-insensitive) produce a parse error.
84
86
-**Rule titles:** Unique within their parent Feature. Rule titles are used internally as keys for background lookup and in error messages — duplicate rule titles within a Feature produce a parse error. Per the Gherkin specification, rule names must be unique within their parent feature.
85
87
-**Feature titles:** Globally unique across all features. Feature titles determine the generated folder structure — `Feature: Bank` generates `tests/features/bank/`. Duplicate or special-character feature titles would create path collisions or invalid directories.
0 commit comments