mirror of
https://github.com/django/django.git
synced 2025-10-31 09:41:08 +00:00
Fixed #28730 -- Fixed loss of precision for large integer literals in templates
Thanks Fraser Nevett for the report and Tim Graham for patch edits.
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
from django.template.base import VariableDoesNotExist
|
||||
from django.template.base import Variable, VariableDoesNotExist
|
||||
from django.test import SimpleTestCase
|
||||
|
||||
|
||||
@@ -6,3 +6,8 @@ class VariableDoesNotExistTests(SimpleTestCase):
|
||||
def test_str(self):
|
||||
exc = VariableDoesNotExist(msg='Failed lookup in %r', params=({'foo': 'bar'},))
|
||||
self.assertEqual(str(exc), "Failed lookup in {'foo': 'bar'}")
|
||||
|
||||
|
||||
class VariableTests(SimpleTestCase):
|
||||
def test_integer_literals(self):
|
||||
self.assertEqual(Variable('999999999999999999999999999').literal, 999999999999999999999999999)
|
||||
|
||||
Reference in New Issue
Block a user