beeware/toga

Changing Android emulator skin to `pixel_7_pro` breaks scroll tests

Open

#2.251 aberto em 29 de nov. de 2023

Ver no GitHub
 (4 comments) (0 reactions) (0 assignees)Python (624 forks)batch import
androidbuggood first issue

Métricas do repositório

Stars
 (3.615 stars)
Métricas de merge de PR
 (Mesclagem média 5d) (64 fundiu PRs em 30d)

Description

Originally posted by @rmartin16 in https://github.com/beeware/toga/issues/2249#issuecomment-1830617979


I/python.stdout: =================================== FAILURES ===================================
I/python.stdout: _________________________________ test_scroll __________________________________
I/python.stdout: Traceback (most recent call last):
I/python.stdout:   File "/data/data/org.beeware.toga.testbed/files/chaquopy/AssetFinder/app/tests/widgets/test_detailedlist.py", line 107, in test_scroll
I/python.stdout:     assert probe.scroll_position == pytest.approx(
I/python.stdout: AssertionError: assert 4000.0 == 3469.5238095238096 ± 4.0e+02
I/python.stdout:   comparison failed
I/python.stdout:   Obtained: 4000.0
I/python.stdout:   Expected: 3469.5238095238096 ± 4.0e+02
I/python.stdout: _________________________________ test_scroll __________________________________
I/python.stdout: Traceback (most recent call last):
I/python.stdout:   File "/data/data/org.beeware.toga.testbed/files/chaquopy/AssetFinder/app/tests/widgets/test_table.py", line 126, in test_scroll
I/python.stdout:     assert probe.max_scroll_position > probe.height * 2
I/python.stdout: AssertionError: assert 1286.095238095238 > (1061 * 2)
I/python.stdout:  +  where 1286.095238095238 = <tests_backend.widgets.table.TableProbe object at 0x70811b283d60>.max_scroll_position
I/python.stdout:  +  and   1061 = <tests_backend.widgets.table.TableProbe object at 0x70811b283d60>.height
I/python.stdout: =========================== short test summary info ============================
I/python.stdout: FAILED tests/widgets/test_detailedlist.py::test_scroll - assert 4000.0 == 346...
I/python.stdout: FAILED tests/widgets/test_table.py::test_scroll - assert 1286.095238095238 > ...
I/python.stdout: ====== 2 failed, 328 passed, 61 skipped, 25 xfailed in 195.32s (0:03:15) =======

I was able to resolve the testbed failures by having the AVD use pixel_3a skin again.

Guia do colaborador