Opened 4 years ago

Closed 4 years ago

Last modified 4 years ago

#31521 closed Cleanup/optimization (fixed)

test_parsing_rfc850 test failure on 32-bit platforms.

Reported by: Tomáš Chvátal Owned by: Hasan Ramezani
Component: Core (Other) Version: dev
Severity: Normal Keywords:
Cc: Triage Stage: Accepted
Has patch: yes Needs documentation: no
Needs tests: no Patch needs improvement: yes
Easy pickings: yes UI/UX: no

Description

As the test checks for date that is not supported there it simply overflows:

[  405s] ERROR: test_parsing_rfc850 (utils_tests.test_http.HttpDateProcessingTests) [<object object at 0xa4e44cb0>] (rfc850str='Tuesday, 31-Dec-69 08:49:37 GMT')
[  405s] ----------------------------------------------------------------------
[  405s] Traceback (most recent call last):
[  405s]   File "/usr/lib/python3.8/unittest/case.py", line 60, in testPartExecutor
[  405s]     yield
[  405s]   File "/usr/lib/python3.8/unittest/case.py", line 582, in subTest
[  405s]     yield
[  405s]   File "/home/abuild/rpmbuild/BUILD/Django-3.0.5/tests/utils_tests/test_http.py", line 340, in test_parsing_rfc850
[  405s]     self.assertEqual(datetime.utcfromtimestamp(parsed), expected_date)
[  405s] OverflowError: timestamp out of range for platform time_t
[  405s] 
[  405s] ======================================================================
[  405s] ERROR: test_parsing_rfc850 (utils_tests.test_http.HttpDateProcessingTests) [<object object at 0xa4e44cb0>] (rfc850str='Wednesday, 31-Dec-70 08:49:37 GMT')
[  405s] ----------------------------------------------------------------------
[  405s] Traceback (most recent call last):
[  405s]   File "/usr/lib/python3.8/unittest/case.py", line 60, in testPartExecutor
[  405s]     yield
[  405s]   File "/usr/lib/python3.8/unittest/case.py", line 582, in subTest
[  405s]     yield
[  405s]   File "/home/abuild/rpmbuild/BUILD/Django-3.0.5/tests/utils_tests/test_http.py", line 340, in test_parsing_rfc850
[  405s]     self.assertEqual(datetime.utcfromtimestamp(parsed), expected_date)
[  405s] OverflowError: timestamp out of range for platform time_t
[  405s] 
[  405s] ----------------------------------------------------------------------

I guess easiest is to skip those on if the platform is known to not support it.

Change History (5)

comment:1 by Mariusz Felisiak, 4 years ago

Component: Testing frameworkCore (Other)
Easy pickings: set
Summary: test_parsing_rfc850 fails on 32bit intel platformstest_parsing_rfc850 test failure on 32-bit platforms.
Triage Stage: UnreviewedAccepted
Type: UncategorizedCleanup/optimization
Version: 3.0master

Thanks, it's fixable (see similar ticket #30264). We can use dates from the previous century.

comment:2 by Hasan Ramezani, 4 years ago

Has patch: set
Owner: changed from nobody to Hasan Ramezani
Status: newassigned
Last edited 4 years ago by Mariusz Felisiak (previous) (diff)

comment:3 by Mariusz Felisiak, 4 years ago

Patch needs improvement: set

comment:4 by Mariusz Felisiak <felisiak.mariusz@…>, 4 years ago

Resolution: fixed
Status: assignedclosed

In f1216210:

Fixed #31521 -- Skipped test_parsing_rfc850 test on 32-bit systems.

comment:5 by Mariusz Felisiak <felisiak.mariusz@…>, 4 years ago

In 8e23b89f:

[3.0.x] Fixed #31521 -- Skipped test_parsing_rfc850 test on 32-bit systems.

Backport of f12162107327b88a2f1faaab15d048e2535ec642 from master

Note: See TracTickets for help on using tickets.
Back to Top