Skip to content

Commit 606b80e

Browse files
authored
convert test id from plan to string (via allure-framework#425)
1 parent d2c09e4 commit 606b80e

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

allure-pytest/src/plugin.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -153,7 +153,7 @@ def select_by_testcase(items):
153153
if file_path:
154154
with open(file_path, 'r') as file:
155155
plan = json.load(file)
156-
ids = set([item.get("id") for item in plan])
156+
ids = set([str(item.get("id")) for item in plan])
157157
return filter(lambda item: ids & set(allure_label(item, LabelType.ID)) if ids else True, items)
158158

159159

allure-pytest/test/integration/allure_ee/select_by_testcase_id_test.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,11 +8,11 @@
88
["ids", "expected_tests"],
99
[
1010
(
11-
[{"id": "1"}, {"id": "2"}],
11+
[{"id": 1}, {"id": 2}],
1212
["test_number_one", "test_number_two"]
1313
),
1414
(
15-
[{"id": "1"}, {"id": "3"}, {"id": "3+"}],
15+
[{"id": 1}, {"id": 3}, {"id": 4}],
1616
["test_number_one", "test_number_three"]
1717
),
1818
(
@@ -34,7 +34,7 @@ def test_select_by_testcase_id_test(ids, expected_tests, allured_testdir):
3434
... pass
3535
3636
>>> @allure.id("3")
37-
... @allure.id("3+")
37+
... @allure.id("4")
3838
... def test_number_three():
3939
... pass
4040

0 commit comments

Comments
 (0)