1
0
Эх сурвалжийг харах

remove integration screenshots (#4677)

Khaleel Al-Adhami 3 сар өмнө
parent
commit
1106aae76e

+ 0 - 7
.github/workflows/integration_app_harness.yml

@@ -50,14 +50,7 @@ jobs:
       - run: poetry run uv pip install pyvirtualdisplay pillow pytest-split pytest-retry
       - run: poetry run uv pip install pyvirtualdisplay pillow pytest-split pytest-retry
       - name: Run app harness tests
       - name: Run app harness tests
         env:
         env:
-          SCREENSHOT_DIR: /tmp/screenshots/${{ matrix.state_manager }}/${{ matrix.python-version }}/${{ matrix.split_index }}
           REDIS_URL: ${{ matrix.state_manager == 'redis' && 'redis://localhost:6379' || '' }}
           REDIS_URL: ${{ matrix.state_manager == 'redis' && 'redis://localhost:6379' || '' }}
         run: |
         run: |
           poetry run playwright install chromium
           poetry run playwright install chromium
           poetry run pytest tests/integration --retries 3 --maxfail=5 --splits 2 --group ${{matrix.split_index}}
           poetry run pytest tests/integration --retries 3 --maxfail=5 --splits 2 --group ${{matrix.split_index}}
-      - uses: actions/upload-artifact@v4
-        name: Upload failed test screenshots
-        if: always()
-        with:
-          name: failed_test_screenshots
-          path: /tmp/screenshots

+ 0 - 3
reflex/config.py

@@ -556,9 +556,6 @@ class EnvironmentVariables:
     # Arguments to pass to the app harness driver.
     # Arguments to pass to the app harness driver.
     APP_HARNESS_DRIVER_ARGS: EnvVar[str] = env_var("")
     APP_HARNESS_DRIVER_ARGS: EnvVar[str] = env_var("")
 
 
-    # Where to save screenshots when tests fail.
-    SCREENSHOT_DIR: EnvVar[Optional[Path]] = env_var(None)
-
     # Whether to check for outdated package versions.
     # Whether to check for outdated package versions.
     REFLEX_CHECK_LATEST_VERSION: EnvVar[bool] = env_var(True)
     REFLEX_CHECK_LATEST_VERSION: EnvVar[bool] = env_var(True)
 
 

+ 0 - 30
tests/integration/conftest.py

@@ -1,8 +1,6 @@
 """Shared conftest for all integration tests."""
 """Shared conftest for all integration tests."""
 
 
 import os
 import os
-import re
-from pathlib import Path
 
 
 import pytest
 import pytest
 
 
@@ -36,34 +34,6 @@ def xvfb():
         yield None
         yield None
 
 
 
 
-def pytest_exception_interact(node, call, report):
-    """Take and upload screenshot when tests fail.
-
-    Args:
-        node: The pytest item that failed.
-        call: The pytest call describing when/where the test was invoked.
-        report: The pytest log report object.
-    """
-    screenshot_dir = environment.SCREENSHOT_DIR.get()
-    if DISPLAY is None or screenshot_dir is None:
-        return
-
-    screenshot_dir = Path(screenshot_dir)
-    screenshot_dir.mkdir(parents=True, exist_ok=True)
-    safe_filename = re.sub(
-        r"(?u)[^-\w.]",
-        "_",
-        str(node.nodeid).strip().replace(" ", "_").replace(":", "_").replace(".py", ""),
-    )
-
-    try:
-        DISPLAY.waitgrab().save(
-            (Path(screenshot_dir) / safe_filename).with_suffix(".png"),
-        )
-    except Exception as e:
-        print(f"Failed to take screenshot for {node}: {e}")
-
-
 @pytest.fixture(
 @pytest.fixture(
     scope="session", params=[AppHarness, AppHarnessProd], ids=["dev", "prod"]
     scope="session", params=[AppHarness, AppHarnessProd], ids=["dev", "prod"]
 )
 )