beeware/toga

Changing Android emulator skin to `pixel_7_pro` breaks scroll tests

Ouverte

#2 251 ouverte le 29 nov. 2023

 (4 commentaires) (0 réaction) (0 personne assignée)Python (624 forks)batch import
androidbuggood first issue

Métriques du dépôt

Stars
 (3 615 étoiles)
Métriques de merge PR
 (Merge moyen 5j) (64 PRs mergées en 30 j)

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.

Guide contributeur