mirror of
				https://github.com/django/django.git
				synced 2025-10-31 12:05:47 +00:00 
			
		
		
		
	[py3] Ported django.utils.baseconv.
This commit is contained in:
		
							parent
							
								
									13338a6314
								
							
						
					
					
						commit
						b55e07771f
					
				
					 1 changed files with 2 additions and 1 deletions
				
			
		|  | @ -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))) | ||||
|  |  | |||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue
	
	 Aymeric Augustin
						Aymeric Augustin