mirror of
https://github.com/django/django.git
synced 2025-08-02 10:02:41 +00:00
Fixed #23812 -- Changed django.utils.six.moves.xrange imports to range
This commit is contained in:
parent
a5499b0916
commit
895dc880eb
27 changed files with 95 additions and 94 deletions
|
@ -1,13 +1,13 @@
|
|||
from unittest import TestCase
|
||||
|
||||
from django.utils.baseconv import base2, base16, base36, base56, base62, base64, BaseConverter
|
||||
from django.utils.six.moves import xrange
|
||||
from django.utils.six.moves import range
|
||||
|
||||
|
||||
class TestBaseConv(TestCase):
|
||||
|
||||
def test_baseconv(self):
|
||||
nums = [-10 ** 10, 10 ** 10] + list(xrange(-100, 100))
|
||||
nums = [-10 ** 10, 10 ** 10] + list(range(-100, 100))
|
||||
for converter in [base2, base16, base36, base56, base62, base64]:
|
||||
for i in nums:
|
||||
self.assertEqual(i, converter.decode(converter.encode(i)))
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue