Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

[py3] Ported django.utils.baseconv.

  • Loading branch information...
commit b55e07771fdc9f9cc80fb099429774672aaf9be9 1 parent 13338a6
@aaugustin aaugustin authored
Showing with 2 additions and 1 deletion.
  1. +2 −1  tests/regressiontests/utils/baseconv.py
View
3  tests/regressiontests/utils/baseconv.py
@@ -1,10 +1,11 @@
from unittest import TestCase
from django.utils.baseconv import base2, base16, base36, base56, base62, base64, BaseConverter
+from django.utils.six.moves import xrange
class TestBaseConv(TestCase):
def test_baseconv(self):
- nums = [-10 ** 10, 10 ** 10] + range(-100, 100)
+ nums = [-10 ** 10, 10 ** 10] + list(xrange(-100, 100))
for converter in [base2, base16, base36, base56, base62, base64]:
for i in nums:
self.assertEqual(i, converter.decode(converter.encode(i)))
Please sign in to comment.
Something went wrong with that request. Please try again.