bpo-30183: Fixes HP-UX cc compilation error in pytime.c by haney · Pull Request #1351 · python/cpython (original) (raw)

The failing tests in test_time appear to be unrelated to this change, and I expect were pre-existing failures on this platform. The test output I'm seeing follows:

======================================================================
FAIL: test_4dyear (test.test_time.TestStrftime4dyear)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/amd/devco/haney/git/cpython/Lib/test/test_time.py", line 557, in test_4dyear
    self.test_year('%04d', func=year4d)
  File "/amd/devco/haney/git/cpython/Lib/test/test_time.py", line 587, in test_year
    self.assertEqual(func(1),    fmt % 1)
AssertionError: '' != '0001'
+ 0001

======================================================================
FAIL: test_large_year (test.test_time.TestStrftime4dyear)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/amd/devco/haney/git/cpython/Lib/test/test_time.py", line 572, in test_large_year
    return super().test_large_year()
  File "/amd/devco/haney/git/cpython/Lib/test/test_time.py", line 595, in test_large_year
    self.assertEqual(self.yearstr(12345), '12345')
AssertionError: '' != '12345'
+ 12345

======================================================================
FAIL: test_negative (test.test_time.TestStrftime4dyear)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/amd/devco/haney/git/cpython/Lib/test/test_time.py", line 576, in test_negative
    return super().test_negative()
  File "/amd/devco/haney/git/cpython/Lib/test/test_time.py", line 601, in test_negative
    self.assertEqual(self.yearstr(-1), self._format % -1)
AssertionError: '' != '-1'
+ -1

======================================================================
FAIL: test_year (test.test_time.TestStrftime4dyear)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/amd/devco/haney/git/cpython/Lib/test/test_time.py", line 587, in test_year
    self.assertEqual(func(1),    fmt % 1)
AssertionError: '' != '1'
+ 1

======================================================================
FAIL: test_default_values_for_zero (test.test_time.TimeTestCase)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/amd/devco/haney/git/cpython/Lib/test/test_time.py", line 210, in test_default_values_for_zero
    self.assertEqual(expected, result)
AssertionError: '2000 01 01 00 00 00 1 001' != ''
- 2000 01 01 00 00 00 1 001
+


======================================================================
FAIL: test_strptime (test.test_time.TimeTestCase)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/amd/devco/haney/git/cpython/Lib/test/test_time.py", line 222, in test_strptime
    time.strptime(strf_output, format)
ValueError: time data '' does not match format '%d'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/amd/devco/haney/git/cpython/Lib/test/test_time.py", line 225, in test_strptime
    (format, strf_output))
AssertionError: conversion specifier '%d' failed with '' input.

----------------------------------------------------------------------

Since the tests that are failing all appear to be related to formatting time objects, I don't think they are related to this change. test_monotonic, which I would expect to be directly related to this change, is passing.