Skip to content

Commit

Permalink
Fix unrecognized arguments error for log capturing tests
Browse files Browse the repository at this point in the history
  • Loading branch information
delatrie committed Apr 1, 2024
1 parent 15c8466 commit 113e7f4
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 5 deletions.
5 changes: 2 additions & 3 deletions tests/allure_pytest/acceptance/capture/capture_attach_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -90,10 +90,9 @@ def test_capture_log(allure_pytest_runner: AllurePytestRunner, logging):
... logger.info("Start step")
"""

params = [] if logging else ["-p", "no:logging"]
log_level = "INFO" if logging else "WARNING"
allure_results = allure_pytest_runner.run_docstring(
"--log-level=INFO",
*params
f"--log-level={log_level}",
)

if_logging_ = is_ if logging else is_not
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -134,10 +134,10 @@ def then_the_postconditions_are_held():
"""
)

params = [] if logging else ["-p", "no:logging"]
log_level = "INFO" if logging else "WARNING"
allure_results = allure_pytest_bdd_runner.run_pytest(
("scenario.feature", feature_content),
steps_content, cli_args=("--log-level=INFO", *params)
steps_content, cli_args=(f"--log-level={log_level}",)
)

if_logging_ = is_ if logging else is_not
Expand Down

0 comments on commit 113e7f4

Please sign in to comment.