INNER CODE UNIT · Python

delta

yaojingang/GEOFlow · scripts/audit-admin-ui-v3-flicker.py:81

def delta(first: dict | None, final: dict | None, key: str) -> float | None:
    if not first or not final:
        return None
    return round(abs(float(first[key]) - float(final[key])), 3)


def is_unexpected_console_error(message: str) -> bool:
    return not any(diagnostic in message for diagnostic in EXPECTED_BROWSER_DIAGNOSTICS)


def audit_url(base_url: str, recorded_url: str) -> str:
    base = urlparse(base_url)
    recorded = urlparse(recorded_url)

    return urlunparse((base.scheme, base.netloc, recorded.path, '', recorded.query, ''))


def page_result(page, row: dict[str, str], viewport_name: str) -> dict:

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…