Source: pygame Version: 2.1.2+dfsg-5 Severity: serious Tags: patch upstream
Dear Maintainer, Your package FTBFS on s390x: ====================================================================== FAIL: test_get_time (pygame.tests.time_test.ClockTypeTest) ---------------------------------------------------------------------- Traceback (most recent call last): File "/<<PKGBUILDDIR>>/.pybuild/cpython3_3.10_pygame/build/pygame/tests/time_test.py", line 83, in test_get_time self.assertAlmostEqual(delay_miliseconds, c1, delta=delta) AssertionError: 100.0 != 182 within 50 delta (82.0 difference) ====================================================================== FAIL: test_tick (pygame.tests.time_test.ClockTypeTest) Tests time.Clock.tick() ---------------------------------------------------------------------- Traceback (most recent call last): File "/<<PKGBUILDDIR>>/.pybuild/cpython3_3.10_pygame/build/pygame/tests/time_test.py", line 155, in test_tick self.assertAlmostEqual(end - start, 1, delta=epsilon2) AssertionError: 2.06333065032959 != 1 within 0.3 delta (1.0633306503295898 difference) ====================================================================== FAIL: test_delay (pygame.tests.time_test.TimeModuleTest) Tests time.delay() function. ---------------------------------------------------------------------- Traceback (most recent call last): File "/<<PKGBUILDDIR>>/.pybuild/cpython3_3.10_pygame/build/pygame/tests/time_test.py", line 249, in test_delay self._wait_delay_check(pygame.time.delay, millis, iterations, delta) File "/<<PKGBUILDDIR>>/.pybuild/cpython3_3.10_pygame/build/pygame/tests/time_test.py", line 373, in _wait_delay_check self.assertAlmostEqual(wait_time, millis, delta=delta) AssertionError: 278 != 50 within 150 delta (228 difference) ====================================================================== FAIL: test_set_timer (pygame.tests.time_test.TimeModuleTest) Tests time.set_timer() ---------------------------------------------------------------------- Traceback (most recent call last): File "/<<PKGBUILDDIR>>/.pybuild/cpython3_3.10_pygame/build/pygame/tests/time_test.py", line 321, in test_set_timer self.assertNotIn(timer_event, pygame.event.get()) AssertionError: <Event(32851-UserEvent {})> unexpectedly found in [<Event(32851-UserEvent {})>] ---------------------------------------------------------------------- Ran 10 tests in 17.945s FAILED (failures=4) https://buildd.debian.org/status/fetch.php?pkg=pygame&arch=s390x&ver=2.1.2%2Bdfsg-5&stamp=1672327165&raw=0 https://buildd.debian.org/status/logs.php?pkg=pygame&arch=s390x Unfortunately this issue cannot be reproduced on the s390x porterbox where these tests succeed. The attached patch works around the issue by skipping these tests on s390x. Kind Regards, Bas
Description: Skip tests that fail on s390x. Author: Bas Couwenberg <sebas...@debian.org> --- a/test/time_test.py +++ b/test/time_test.py @@ -1,5 +1,6 @@ import unittest import pygame +import platform import time Clock = pygame.time.Clock @@ -64,6 +65,7 @@ class ClockTypeTest(unittest.TestCase): c2 = c.get_time() self.assertAlmostEqual(c1, c2, delta=delta) + @unittest.skipIf(platform.machine() == 's390x', "Fails on s390x") def test_get_time(self): # Testing parameters delay = 0.1 # seconds @@ -94,6 +96,7 @@ class ClockTypeTest(unittest.TestCase): ) #'time' module elapsed time converted to milliseconds self.assertAlmostEqual(d0, c1, delta=delta) + @unittest.skipIf(platform.machine() == 's390x', "Fails on s390x") def test_tick(self): """Tests time.Clock.tick()""" """ @@ -240,6 +243,7 @@ class ClockTypeTest(unittest.TestCase): class TimeModuleTest(unittest.TestCase): __tags__ = ["timing"] + @unittest.skipIf(platform.machine() == 's390x', "Fails on s390x") def test_delay(self): """Tests time.delay() function.""" millis = 50 # millisecond to wait on each iteration @@ -271,6 +275,7 @@ class TimeModuleTest(unittest.TestCase): # Assert almost equality of the ticking time and time difference self.assertAlmostEqual(ticks_diff, time_diff, delta=delta) + @unittest.skipIf(platform.machine() == 's390x', "Fails on s390x") def test_set_timer(self): """Tests time.set_timer()""" """