Skip to content

Commit

Permalink
Fix allure formatting stage name (#777)
Browse files Browse the repository at this point in the history
  • Loading branch information
michaelboulton authored May 2, 2022
1 parent 747701c commit 6f4831c
Show file tree
Hide file tree
Showing 3 changed files with 20 additions and 1 deletion.
4 changes: 3 additions & 1 deletion tavern/core.py
Original file line number Diff line number Diff line change
Expand Up @@ -182,7 +182,9 @@ def getonly(stage):
run_stage_with_retries, sessions, stage, test_block_config
)

allure_name = "Stage {}: {}".format(idx, stage["name"])
allure_name = "Stage {}: {}".format(
idx, format_keys(stage["name"], test_block_config["variables"])
)
step = wrap_step(allure_name, partial)

try:
Expand Down
16 changes: 16 additions & 0 deletions tests/integration/test_allure.tavern.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
---

test_name: "Test test name can have formatting in it: {host}"

includes:
- !include common.yaml

stages:
- name: "Test stage name can have formatting in it: {host}"
request:
url: "{host}/echo"
method: POST
json: hi
response:
status_code: 200
json: hi
1 change: 1 addition & 0 deletions tox-integration.ini
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ changedir =
deps =
docker-compose
flask
allure-pytest
pyjwt
pytest-xdist
pytest-cov
Expand Down

0 comments on commit 6f4831c

Please sign in to comment.