lists.arthurdejong.org
RSS feed

python-stdnum branch master updated. 0.9-13-g97ac94d

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

python-stdnum branch master updated. 0.9-13-g97ac94d



This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "python-stdnum".

The branch, master has been updated
       via  97ac94d10084cbdce72203d5863e1547e7dc6ec9 (commit)
      from  123e9cbce5ba219e183799dcc3ea8d08e64213f3 (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------
http://arthurdejong.org/git/python-stdnum/commit/?id=97ac94d10084cbdce72203d5863e1547e7dc6ec9

commit 97ac94d10084cbdce72203d5863e1547e7dc6ec9
Author: Arthur de Jong <arthur@arthurdejong.org>
Date:   Sun Oct 5 23:19:55 2014 +0200

    Update NRIC tests

diff --git a/stdnum/my/nric.py b/stdnum/my/nric.py
index 0178c12..0eb8844 100644
--- a/stdnum/my/nric.py
+++ b/stdnum/my/nric.py
@@ -1,6 +1,6 @@
 # nric.py - functions for handling  NRIC numbers
 #
-# Copyright (C) 2013 Arthur de Jong
+# Copyright (C) 2013, 2014 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
@@ -33,7 +33,7 @@ the last digit: odd numbers for males and even numbers for 
females.
 Traceback (most recent call last):
     ...
 InvalidComponent: ...
->>> validate('770305-99-1234')  # unknown birth place code
+>>> validate('770305-17-1234')  # unknown birth place code
 Traceback (most recent call last):
     ...
 InvalidComponent: ...
diff --git a/tests/test_my_nric.doctest b/tests/test_my_nric.doctest
index 91aa2aa..a68a932 100644
--- a/tests/test_my_nric.doctest
+++ b/tests/test_my_nric.doctest
@@ -1,6 +1,6 @@
 test_my_nric.doctest - more detailed doctests for stdnum.my.nric module
 
-Copyright (C) 2013 Arthur de Jong
+Copyright (C) 2013, 2014 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
@@ -56,10 +56,10 @@ Get the birth place:
 'Kedah'
 >>> str(nric.get_birth_place('890131-06-1224')['state'])
 'Pahang'
->>> str(nric.get_birth_place('810909785542')['country'])
-'Sri Lanka'
->>> str(nric.get_birth_place('880229875542')['countries'])
-'Britain, Ireland'
+>>> str(nric.get_birth_place('810909785542')['country']).upper()
+'SRI LANKA'
+>>> str(nric.get_birth_place('880229875542')['countries']).upper()
+'BRITAIN, GREAT BRITAIN, IRELAND'
 
 
 Formatting:
@@ -104,7 +104,7 @@ InvalidComponent: ...
 Traceback (most recent call last):
     ...
 InvalidComponent: ...
->>> nric.validate('880229995542')
+>>> nric.validate('880229195542')
 Traceback (most recent call last):
     ...
 InvalidComponent: ...

-----------------------------------------------------------------------

Summary of changes:
 stdnum/my/nric.py          |    4 ++--
 tests/test_my_nric.doctest |   12 ++++++------
 2 files changed, 8 insertions(+), 8 deletions(-)


hooks/post-receive
-- 
python-stdnum
-- 
To unsubscribe send an email to
python-stdnum-commits-unsubscribe@lists.arthurdejong.org or see
http://lists.arthurdejong.org/python-stdnum-commits/