From f63df0d3841918841f73764445af1faeb6a2ed81 Mon Sep 17 00:00:00 2001 From: Elliott Sales de Andrade Date: Fri, 4 Nov 2022 03:33:13 -0400 Subject: [PATCH] Debug other OSs --- .github/workflows/tests.yml | 7 +++++++ lib/matplotlib/tests/test_backend_webagg.py | 4 ++++ 2 files changed, 11 insertions(+) diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index 36a2476457f6..a9331ae7ebb4 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -315,6 +315,7 @@ jobs: run: | pytest -rfEsXR -n auto \ --browser chromium --browser firefox --browser webkit \ + --slowmo=100 --tracing=on --video=on \ --maxfail=50 --timeout=300 --durations=25 \ --cov-report=xml --cov=lib --log-level=DEBUG --color=yes @@ -381,6 +382,12 @@ jobs: name: "${{ matrix.python-version }} ${{ matrix.os }} ${{ matrix.name-suffix }} result images" path: ./result_images + - uses: actions/upload-artifact@v3 + if: failure() + with: + name: "${{ matrix.python-version }} ${{ matrix.os }} ${{ matrix.name-suffix }} playwright" + path: ./test-results + # Separate dependent job to only upload one issue from the matrix of jobs create-issue: if: ${{ failure() && github.event_name == 'schedule' }} diff --git a/lib/matplotlib/tests/test_backend_webagg.py b/lib/matplotlib/tests/test_backend_webagg.py index 1096c461a668..cc1f9d2e5a4c 100644 --- a/lib/matplotlib/tests/test_backend_webagg.py +++ b/lib/matplotlib/tests/test_backend_webagg.py @@ -105,12 +105,16 @@ def test_webagg_resize(random_port, page): canvas = page.locator('canvas.mpl-canvas') + print(f'{orig_bbox=}') # Resize the canvas to be twice as big. bbox = canvas.bounding_box() + print(f'{bbox=}') x, y = bbox['x'] + bbox['width'] - 1, bbox['y'] + bbox['height'] - 1 + print(f'{x=} {y=}') page.mouse.move(x, y) page.mouse.down() page.mouse.move(x + bbox['width'], y + bbox['height']) + print(f'{x + bbox["width"]=} {y + bbox["height"]=}') page.mouse.up() assert fig.bbox.height == orig_bbox.height * 2