1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136
|
test_al_nipt.doctest - more detailed doctests stdnum.al.nipt
Copyright (C) 2015-2023 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
License as published by the Free Software Foundation; either
version 2.1 of the License, or (at your option) any later version.
This library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
Lesser General Public License for more details.
You should have received a copy of the GNU Lesser General Public
License along with this library; if not, write to the Free Software
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
02110-1301 USA
This file contains more detailed doctests for the stdnum.al.nipt module.
>>> from stdnum.al import nipt
>>> from stdnum.exceptions import *
These have been found online and should all be valid numbers. There is also
a validation service at
http://www.qkr.gov.al/kerko/kerko-ne-regjistrin-tregtar/kerko-per-subjekt/
>>> numbers = '''
...
... J 98624806 P
... J61827501H
... J61922018S
... J61923008Q
... J62903770O
... J66702410U
... J67902218L
... J67902618M
... J73721043Q
... J74517201G
... J76418907K
... J76705047U
... J77411245Q
... J78716317H
... J82916489E
... J86526614T
... J91425005N
... J93910409N
... K 01725001F
... K 11723003 M
... K 37507987 N
... K 41424801 U
... K 47905861 R
... K 63005203 O
... K 67204202 P
... K01730502W
... K11515001T
... K12113002H
... K13001013H
... K14019001H
... K21622001M
... K22218003V
... K31518077S
... K31525146H
... K31526056N
... K32203501H
... K32801430W
... K33714725W
... K36308746I
... K36520204A
... K41315003J
... K46621201I
... K51518058O
... K56417201G
... K59418208E
... K61617040L
... K71822006R
... K72113010E
... K81428502L
... K81618039O
... K82418002C
... K82612003J
... K91725009J
... K92402023O
... L 22614402 H
... L 62119008 A
... L01622006F
... L01717030C
... L02023501H
... L02226012N
... L03321203G
... L03929803I
... L06426702Q
... L07305201K
... L08711201I
... L11325024K
... L11810502T
... L12213005M
... L14118803B
... L21310054D
... L21408015A
... L21429502L
... L21906001L
... L21923507N
... L22804207O
... L24006002V
... L29616001A
... L31518001O
... L32210507A
... L32319014A
... L32622601G
... L41410025S
... L41512005R
... L42008005H
... L42115015G
... L42307007E
... L44119601E
... L47014204F
... L48117101S
... L52305009L
... L58428303T
... L62119008A
... L72031013B
... L81506043D
... L81618040T
... L82306024Q
... L98602504L
... M 02129023 S
... M 11807013 N
... M02129023 S
...
... '''
>>> [x for x in numbers.splitlines() if x and not nipt.is_valid(x)]
[]
|