lists.arthurdejong.org
RSS feed

python-stdnum commit: r57 - python-stdnum/tests

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

python-stdnum commit: r57 - python-stdnum/tests



Author: arthur
Date: Sat Feb  5 22:57:09 2011
New Revision: 57
URL: http://arthurdejong.org/viewvc/python-stdnum?view=rev&revision=57

Log:
fix imports of iso7064.mod_*_* modules

Modified:
   python-stdnum/tests/test_iso7064.doctest

Modified: python-stdnum/tests/test_iso7064.doctest
==============================================================================
--- python-stdnum/tests/test_iso7064.doctest    Sat Feb  5 22:55:57 2011        
(r56)
+++ python-stdnum/tests/test_iso7064.doctest    Sat Feb  5 22:57:09 2011        
(r57)
@@ -1,6 +1,6 @@
-test_iso7064.doctest - more detailed doctests for the stdnum.iso7064 package
+test_doctest - more detailed doctests for the stdnum.iso7064 package
 
-Copyright (C) 2010 Arthur de Jong
+Copyright (C) 2010, 2011 Arthur de Jong
 
 This library is free software; you can redistribute it and/or
 modify it under the terms of the GNU Lesser General Public
@@ -22,49 +22,49 @@
 tries to test more corner cases and detailed functionality that is not
 really useful as module documentation.
 
->>> from stdnum import iso7064
+>>> from stdnum.iso7064 import mod_11_10, mod_11_2, mod_37_2, mod_37_36, 
mod_97_10
 
 
 These are normal variations of Mod 11, 10 that should just work.
 
->>> iso7064.mod_11_10.is_valid('12323')
+>>> mod_11_10.is_valid('12323')
 True
->>> iso7064.mod_11_10.is_valid('546794')
+>>> mod_11_10.is_valid('546794')
 True
->>> iso7064.mod_11_10.calc_check_digit('0794')
+>>> mod_11_10.calc_check_digit('0794')
 '5'
->>> iso7064.mod_11_10.is_valid('07945')
+>>> mod_11_10.is_valid('07945')
 True
->>> iso7064.mod_11_10.calc_check_digit('00200667308')
+>>> mod_11_10.calc_check_digit('00200667308')
 '5'
->>> iso7064.mod_11_10.is_valid('002006673085')
+>>> mod_11_10.is_valid('002006673085')
 True
->>> iso7064.mod_11_10.is_valid('002006673084')
+>>> mod_11_10.is_valid('002006673084')
 False
->>> iso7064.mod_11_10.calc_check_digit('00200667309')
+>>> mod_11_10.calc_check_digit('00200667309')
 '3'
->>> iso7064.mod_11_10.calc_check_digit('00200667310')
+>>> mod_11_10.calc_check_digit('00200667310')
 '8'
->>> iso7064.mod_11_10.calc_check_digit('00200667311')
+>>> mod_11_10.calc_check_digit('00200667311')
 '6'
->>> iso7064.mod_11_10.calc_check_digit('00200667312')
+>>> mod_11_10.calc_check_digit('00200667312')
 '4'
 
 
 These normal tests of Mod 11, 2 should just work.
 
->>> iso7064.mod_11_2.calc_check_digit('0794')
+>>> mod_11_2.calc_check_digit('0794')
 '0'
->>> iso7064.mod_11_2.is_valid('07940')
+>>> mod_11_2.is_valid('07940')
 True
->>> iso7064.mod_11_2.calc_check_digit('079')
+>>> mod_11_2.calc_check_digit('079')
 'X'
->>> iso7064.mod_11_2.is_valid('079')
+>>> mod_11_2.is_valid('079')
 True
 
 These normal tests of Mod 37, 2 should just work
 
->>> iso7064.mod_37_2.calc_check_digit('G123498654321')
+>>> mod_37_2.calc_check_digit('G123498654321')
 'H'
 
 
@@ -72,13 +72,13 @@
 junk passed:
 
 >>> testvalues = ( None, '*&^%$', False, object() )
->>> [ x for x in testvalues if iso7064.mod_11_10.is_valid(x) ]
+>>> [ x for x in testvalues if mod_11_10.is_valid(x) ]
 []
->>> [ x for x in testvalues if iso7064.mod_11_2.is_valid(x) ]
+>>> [ x for x in testvalues if mod_11_2.is_valid(x) ]
 []
->>> [ x for x in testvalues if iso7064.mod_37_2.is_valid(x) ]
+>>> [ x for x in testvalues if mod_37_2.is_valid(x) ]
 []
->>> [ x for x in testvalues if iso7064.mod_37_36.is_valid(x) ]
+>>> [ x for x in testvalues if mod_37_36.is_valid(x) ]
 []
->>> [ x for x in testvalues if iso7064.mod_97_10.is_valid(x) ]
+>>> [ x for x in testvalues if mod_97_10.is_valid(x) ]
 []
-- 
To unsubscribe send an email to
python-stdnum-commits-unsubscribe@lists.arthurdejong.org or see
http://lists.arthurdejong.org/python-stdnum-commits