Update to 1.15 - compatible with behave version 1.3.0 #97
Conversation
|
@jenisys Would you know why the tests are failing like this? https://github.com/behave-contrib/behave-html-pretty-formatter/actions/runs/16989669598?pr=97
I am trying to figure out where the problems is but no luck for now. Perhaps you also dealt with in behave? |
|
I mean, I can add to all files that the problem is in: but something is weird here, how did the main got removed from globals? |
|
@jenisys Alright, it seems somewhere between 1.2.6 and 1.3.0 something got broken with globals in tests/acceptance. Do you have any idea where the issue might be? The 1.3.1 fails, the 1.3.0 fails, the 1.2.6 is alright, as can be seen here. Reverting back to 1.3.1 |
|
Mmh, what should I say:
WHAT IS THE PROBLEM (the failures in the CI test run):
ADDITIONAL FIXES THAT I NEEDED: # -- FILE: tests/acceptance/features/help-screen.feature
...
Then it should pass
And the command output should contain:
"""
- Available formatters:
+ AVAILABLE FORMATTERS:
+ captured Inspect captured output.
html-pretty Pretty HTML Formatter
json JSON dump of test run
"""# -- FILE: tests/acceptance/features/html-output.feature
# NEEDED: feature-file, steps-directory even in dry-run mode
...
+ And a file named "features/steps/use_behave4cmd0_steps.py" with:
+ """
+ from behave4cmd0 import passing_steps
+ """
+ And a file named "features/passing.feature" with:
+ """
+ Feature: Passing
+ Scenario: One
+ Given a step passes
+ When another step passes
+ """
When I run "behave --format html-pretty --dry-run"
Then it should pass
And the command output should contain:# -- FILE: tests/formatter_features/behave.ini
+[behave]
+default_format = pretty
+# -- ENSURE: At least one html-pretty formatter is used.
+format = html-pretty
+output = report.html
... |
|
@jenisys thank you, these hints were very useful. Since I did not setup the behave4cmd0, it did not occur to me it could be the reason (this kind of error is a first for me, next time I will know what to focus on). Moving the behave4cmd0 from steps and some minor changes were enough to fix it. |
Fix behave version to 1.3.0.
Fix before scenario step handling (new behave calls methods in reverse).
Add default background to unhandled scenario status.
Support late registration of formatter in before_scenario. Closes #94
Fix dependency on external tools in tests. Closes #96