Skip to content

Commit

Permalink
minor
Browse files Browse the repository at this point in the history
  • Loading branch information
pcrespov committed Sep 19, 2024
1 parent 2472fb2 commit 8dd59d8
Showing 1 changed file with 5 additions and 6 deletions.
11 changes: 5 additions & 6 deletions tests/e2e-playwright/tests/conftest.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
import os
import random
import re
import textwrap
import urllib.parse
from collections.abc import Callable, Iterator
from contextlib import ExitStack
Expand All @@ -22,7 +23,6 @@
from playwright.sync_api import APIRequestContext, BrowserContext, Page, WebSocket
from playwright.sync_api._generated import Playwright
from pydantic import AnyUrl, TypeAdapter
from pytest import Item
from pytest_simcore.helpers.logging_tools import log_context
from pytest_simcore.helpers.playwright import (
MINUTE,
Expand Down Expand Up @@ -121,7 +121,7 @@ def pytest_addoption(parser: pytest.Parser) -> None:


# Dictionary to store start times of tests
_test_start_times = {}
_test_start_times: dict[str, datetime.datetime] = {}


def pytest_runtest_setup(item):
Expand Down Expand Up @@ -149,7 +149,7 @@ def _construct_graylog_url(
return f"{monitoring_url}/graylog/search?{query}"


def pytest_runtest_makereport(item: Item, call):
def pytest_runtest_makereport(item: pytest.Item, call):
"""
Hook to add extra information when a test fails.
"""
Expand All @@ -176,9 +176,8 @@ def pytest_runtest_makereport(item: Item, call):
)
diagnostics["duration"] = str(end_time - start_time)

# Print the diagnostics report
print(f"\nDiagnostics repoort for {test_name} ---")
print(json.dumps(diagnostics, indent=2))
print(f"\nDiagnostics report for {test_name} ---")
print(textwrap.indent(json.dumps(diagnostics, indent=2), " "))
print("---")


Expand Down

0 comments on commit 8dd59d8

Please sign in to comment.