lists.arthurdejong.org
RSS feed

python-stdnum commit: r47 - in python-stdnum: . stdnum

[Date Prev][Date Next] [Thread Prev][Thread Next]

python-stdnum commit: r47 - in python-stdnum: . stdnum



Author: arthur
Date: Sun Jan 16 09:49:39 2011
New Revision: 47
URL: http://arthurdejong.org/viewvc/python-stdnum?view=rev&revision=47

Log:
add test for partial match

Modified:
   python-stdnum/stdnum/numdb.py
   python-stdnum/test.dat

Modified: python-stdnum/stdnum/numdb.py
==============================================================================
--- python-stdnum/stdnum/numdb.py       Sat Jan 15 21:27:39 2011        (r46)
+++ python-stdnum/stdnum/numdb.py       Sun Jan 16 09:49:39 2011        (r47)
@@ -49,6 +49,9 @@
 [('90', {'prop1': 'booz'}), ('985', {'prop2': 'fooz'}), ('6', {})]
 >>> dbfile.info('9889')
 [('98', {'prop1': 'booz'}), ('89', {'prop2': 'foo'})]
+>>> dbfile.info('633322')
+[('6', {'prop1': 'boo'}), ('333', {'prop2': 'bar', 'prop3': 'baz'}), ('22', 
{})]
+
 """
 
 import re

Modified: python-stdnum/test.dat
==============================================================================
--- python-stdnum/test.dat      Sat Jan 15 21:27:39 2011        (r46)
+++ python-stdnum/test.dat      Sun Jan 16 09:49:39 2011        (r47)
@@ -2,6 +2,7 @@
 0-8 prop1="foo"
   100-999 prop2="bar"
   200,300-399 prop3="baz"
+6 prop1="boo"
 90-99 prop1="booz"
   00-89 prop2="foo"
   900-999 prop2="fooz"
--
To unsubscribe send an email to
python-stdnum-commits-unsubscribe@lists.arthurdejong.org or see
http://lists.arthurdejong.org/python-stdnum-commits