1
0
mirror of https://github.com/django/django.git synced 2025-10-26 07:06:08 +00:00

Refs #34986 -- Fixed some test assertions for PyPy.

These failures were due to minor inconsistencies or implementation
differences between CPython and PyPy.
This commit is contained in:
Nick Pope
2023-11-21 15:11:58 +00:00
committed by Mariusz Felisiak
parent 051dbb5388
commit baf705f34a
5 changed files with 17 additions and 6 deletions

View File

@@ -5,6 +5,7 @@ from django.forms import DateField, Form, SelectDateWidget
from django.test import override_settings
from django.utils import translation
from django.utils.dates import MONTHS_AP
from django.utils.version import PYPY
from .base import WidgetTest
@@ -611,7 +612,11 @@ class SelectDateWidgetTest(WidgetTest):
((None, "12", "1"), None),
(("2000", None, "1"), None),
(("2000", "12", None), None),
((str(sys.maxsize + 1), "12", "1"), "0-0-0"),
(
(str(sys.maxsize + 1), "12", "1"),
# PyPy does not raise OverflowError.
f"{sys.maxsize + 1}-12-1" if PYPY else "0-0-0",
),
]
for values, expected in tests:
with self.subTest(values=values):