diff options
| author | simonw | 2009-04-28 07:30:24 -0700 | 
|---|---|---|
| committer | simonw | 2009-04-28 07:30:24 -0700 | 
| commit | 8d062183fe97300fbc6583c3f0e21d340febd84b (patch) | |
| tree | 84e2d24932098a039122950d28a3888eeba0e77b /src/shorturls/baseconv.py | |
| parent | e34c575835c674772d7ffd54b5434fc0ae556539 (diff) | |
| download | django-shorturls-8d062183fe97300fbc6583c3f0e21d340febd84b.tar.bz2 | |
Tests now run all three example convertors.
Diffstat (limited to 'src/shorturls/baseconv.py')
| -rw-r--r-- | src/shorturls/baseconv.py | 5 | 
1 files changed, 3 insertions, 2 deletions
| diff --git a/src/shorturls/baseconv.py b/src/shorturls/baseconv.py index 5796956..1b7efbd 100644 --- a/src/shorturls/baseconv.py +++ b/src/shorturls/baseconv.py @@ -59,6 +59,7 @@ base62 = BaseConverter(  if __name__ == '__main__':      nums = [-10 ** 10, 10 ** 10] + range(-100, 100) -    for convertor in [bin, hexconv, base62]: +    for c in [bin, hexconv, base62]:          for i in nums: -            assert i == bin.to_decimal(bin.from_decimal(i)), '%s failed' % i +            assert i == c.to_decimal(c.from_decimal(i)), '%s failed' % i + | 
