Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion allure-python-commons-test/src/container.py
Original file line number Diff line number Diff line change
Expand Up @@ -156,7 +156,7 @@ def has_fixture(section, name, *matchers):
section,
has_item(
all_of(
has_entry("name", equal_to(name)),
has_entry("name", equal_to(name) if isinstance(name, str) else name),
*matchers
)
)
Expand Down
42 changes: 30 additions & 12 deletions tests/allure_pytest/acceptance/fixture/fixture_test.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import pytest
from hamcrest import assert_that, not_, all_of
from hamcrest import assert_that, not_, all_of, matches_regexp
from itertools import combinations_with_replacement
from tests.allure_pytest.pytest_runner import AllurePytestRunner

Expand Down Expand Up @@ -287,7 +287,7 @@ def test_with_redefined_fixture(my_fixture):
has_step("Step in before in original fixture")
),
has_after(
"my_fixture::0",
matches_regexp(r"^my_fixture::\d+$"),
has_step("Step in after in original fixture")
)
),
Expand All @@ -298,7 +298,7 @@ def test_with_redefined_fixture(my_fixture):
has_step("Step in before in redefined fixture")
),
has_after(
"my_fixture::0",
matches_regexp(r"^my_fixture::\d+$"),
has_step("Step in after in redefined fixture")
)
)
Expand Down Expand Up @@ -356,18 +356,24 @@ def test_three(request):
has_container(
allure_results,
has_before("parent_auto_call_fixture"),
has_after("parent_auto_call_fixture::0")
has_after(
matches_regexp(r"^parent_auto_call_fixture::\d$")
)
),
has_container(
allure_results,
has_before("child_manual_call_fixture"),
has_after("child_manual_call_fixture::0")
has_after(
matches_regexp(r"^child_manual_call_fixture::\d$")
)
),
not_(
has_container(
allure_results,
has_before("parent_dyn_call_fixture"),
has_after("parent_dyn_call_fixture::0")
has_after(
matches_regexp(r"^parent_dyn_call_fixture::\d$")
)
),
),
not_(
Expand All @@ -382,19 +388,25 @@ def test_three(request):
has_container(
allure_results,
has_before("parent_auto_call_fixture"),
has_after("parent_auto_call_fixture::0")
has_after(
matches_regexp(r"^parent_auto_call_fixture::\d$")
)
),
not_(
has_container(
allure_results,
has_before("child_manual_call_fixture"),
has_after("child_manual_call_fixture::0")
has_after(
matches_regexp(r"^child_manual_call_fixture::\d$")
)
),
),
has_container(
allure_results,
has_before("parent_dyn_call_fixture"),
has_after("parent_dyn_call_fixture::0")
has_after(
matches_regexp(r"^parent_dyn_call_fixture::\d$")
),
),
has_container(
allure_results,
Expand All @@ -406,19 +418,25 @@ def test_three(request):
has_container(
allure_results,
has_before("parent_auto_call_fixture"),
has_after("parent_auto_call_fixture::0")
has_after(
matches_regexp(r"^parent_auto_call_fixture::\d$")
)
),
not_(
has_container(
allure_results,
has_before("child_manual_call_fixture"),
has_after("child_manual_call_fixture::0")
has_after(
matches_regexp(r"^child_manual_call_fixture::\d$")
)
),
),
has_container(
allure_results,
has_before("parent_dyn_call_fixture"),
has_after("parent_dyn_call_fixture::0")
has_after(
matches_regexp(r"^parent_dyn_call_fixture::\d$")
)
),
not_(
has_container(
Expand Down
Loading