Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

helper__build_test_id is added (conftest refactoring)#229

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Merged
Changes fromall 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
34 changes: 18 additions & 16 deletionstests/conftest.py
View file
Open in desktop
Original file line numberDiff line numberDiff line change
Expand Up@@ -199,6 +199,22 @@ def timedelta_to_human_text(delta: datetime.timedelta) -> str:
# /////////////////////////////////////////////////////////////////////////////


def helper__build_test_id(item: pytest.Function) -> str:
assert item is not None
assert isinstance(item, pytest.Function)

testID = ""

if item.cls is not None:
testID = item.cls.__module__ + "." + item.cls.__name__ + "::"

testID = testID + item.name

return testID

# /////////////////////////////////////////////////////////////////////////////


def helper__makereport__setup(
item: pytest.Function, call: pytest.CallInfo, outcome: pluggy.Result
):
Expand All@@ -224,12 +240,7 @@ def helper__makereport__setup(
TEST_PROCESS_STATS.incrementNotExecutedTestCount()
return

testID = ""

if item.cls is not None:
testID = item.cls.__module__ + "." + item.cls.__name__ + "::"

testID = testID + item.name
testID = helper__build_test_id(item)

if rep.outcome == "passed":
testNumber = TEST_PROCESS_STATS.incrementExecutedTestCount()
Expand DownExpand Up@@ -279,12 +290,7 @@ def helper__makereport__call(
assert type(rep) == pytest.TestReport # noqa: E721

# --------
testID = ""

if item.cls is not None:
testID = item.cls.__module__ + "." + item.cls.__name__ + "::"

testID = testID + item.name
testID = helper__build_test_id(item)

# --------
assert call.start <= call.stop
Expand DownExpand Up@@ -394,10 +400,6 @@ def pytest_runtest_makereport(item: pytest.Function, call: pytest.CallInfo):
assert outcome is not None
assert type(outcome) == pluggy.Result # noqa: E721

rep: pytest.TestReport = outcome.get_result()
assert rep is not None
assert type(rep) == pytest.TestReport # noqa: E721

if call.when == "collect":
return

Expand Down

[8]ページ先頭

©2009-2025 Movatter.jp