diff options
author | ianb <devnull@localhost> | 2007-02-01 00:01:08 +0000 |
---|---|---|
committer | ianb <devnull@localhost> | 2007-02-01 00:01:08 +0000 |
commit | 54545f336fb9860d045386b4b956c0c32639dd64 (patch) | |
tree | 2e8b433b3bb69b1db1e5374ae4eee4794f40cb5d /paste/exceptions | |
parent | 046e10f708d2aa3e7cc4c4540677e2d0983729ee (diff) | |
download | paste-54545f336fb9860d045386b4b956c0c32639dd64.tar.gz |
Add most doctests to the automatic testing; fix some problems in tests
Diffstat (limited to 'paste/exceptions')
-rw-r--r-- | paste/exceptions/serial_number_generator.py | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/paste/exceptions/serial_number_generator.py b/paste/exceptions/serial_number_generator.py index eabc9ca..7a8ad4a 100644 --- a/paste/exceptions/serial_number_generator.py +++ b/paste/exceptions/serial_number_generator.py @@ -80,7 +80,7 @@ __test__ = { >>> make_identifier(0) '' >>> make_identifier(1000) - '922' + 'c53' >>> make_identifier(-100) Traceback (most recent call last): ... @@ -90,25 +90,25 @@ __test__ = { ... ValueError: You can only make identifiers out of integers (not 'test') >>> make_identifier(1000000000000) - '5bqderb62' + 'c53x9rqh3' """, 'hash_identifier': """ >>> hash_identifier(0, 5) - 'fg35w' + 'cy2dr' >>> hash_identifier(0, 10) - 'fg35w4t7yv' + 'cy2dr6rg46' >>> hash_identifier('this is a test of a long string', 5) - 'qpvbe' + 'awatu' >>> hash_identifier(0, 26) - 'fg35w4t7yvwr8rxpr3g06xj7cf' + 'cy2dr6rg46cx8t4w2f3nfexzk4' >>> hash_identifier(0, 30) Traceback (most recent call last): ... ValueError: md5 cannot create hashes longer than 26 characters in length (you gave 30) >>> hash_identifier(0, 10, group=4) - 'fg-35w4-t7yv' + 'cy-2dr6-rg46' >>> hash_identifier(0, 10, group=4, upper=True, prefix='M-') - 'M-FG-35W4-T7YV' + 'M-CY-2DR6-RG46' """} if __name__ == '__main__': |