blob: 5c2900ddd6f00a4308bad7893d0b950e5b815cad (
plain)
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
|
test_lei.doctest - more detailed doctests for the stdnum.lei module
Copyright (C) 2017 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.lei module.
>>> from stdnum import lei
>>> from stdnum.exceptions import *
These have been found online and should all be valid numbers.
>>> numbers = '''
...
... 0YPKKE5F0QW6RC51HE09
... 1YTX3EVB2EG3PFFYOI09
... 2138001CY61HDFJ5ZA27
... 2138001KT6BLFA2SBA38
... 213800699Y1P5GMARI40
... 213800DIH9U9264UW504
... 213800F25B5OHORTSI52
... 213800KLHG79RR4RVR16
... 213800KNMQ53LTJQBV92
... 213800KUD8LAJWSQ9D15
... 213800Q3CZMOFF9OE643
... 213800REANX5GCW7AD17
... 213800THICTTOSR1N623
... 213800WWDZ5X6SRDF737
... 213800WWNILTD76WIX72
... 2594005N6NMJM5WSGE40
... 2YXI7YIWYFWZG3QHF204
... 315700EBSH5FQO0A2E52
... 315700UUG8ME8T3NNN23
... 337KMNHEWWWR6B7Q7W10
... 391200J69OE1D0B3ZQ28
... 3YO0DHNPQLJN0PYQXZ94
... 5299007DT4PDT06SZM22
... 5299008A9PK6IQEWE268
... 529900TODVLNUTNSYF94
... 529900UJX7YWK7YK5Z47
... 529900WWBCVXKSBVKS40
... 529900YGP0ANNLITEF34
... 529900Z5WSAAJ3OTQU15
... 549300001TP7X0VE9866
... 54930000YBLXA2M5DV57
... 54930007KCQLYRQLSU30
... 5493000MYJ7H0E3KKG91
... 54930017EFV0P0QWP015
... 54930018TDVHWGLNZ954
... 5493001BD9HCE74UH411
... 5493004NJH3JGW7MVS62
... 5493004QRTOY0WERIJ41
... 54930066SVUPVIHE5U21
... 5493006O7NV2IXKS4288
... 5493007715JF1TY3M614
... 5493007HHN4G8PA5MS11
... 5493007PWOC8DW5KJM17
... 5493008EWHY43YYP8R93
... 5493008VZPPOQ8Y63J10
... 549300EF33KFNMISKX67
... 549300EUCOJ6XD50YM58
... 549300FR4NAW0G8UFI80
... 549300FRSHK45MQIBL14
... 549300GF102RMNYVKB19
... 549300H45ZBEKCVW0U40
... 549300IDQBTGQCXJ5239
... 549300IWFWPPXW87ZE72
... 549300J8EHPRYOKF3869
... 549300JMX497I8GHDT24
... 549300LHQ6XOM0JUW406
... 549300M3SJFSFVXG6X69
... 549300NV50SCQMF8OC75
... 549300O2F2PCD1D7PZ95
... 549300O7ZFXE3YT1GH43
... 549300OIVSR86BGJGT75
... 549300OM88E30DLQTD78
... 549300PATTPXQ660N070
... 549300PFL3HXXEEOHS50
... 549300SILMFILZ8Y4427
... 549300SOEQOO5LPOD659
... 549300TZLPZOAIIMJF22
... 549300UKFZ3BD7TNKI26
... 549300V6KHTZPJ4YVC33
... 549300V6LZG40THFO450
... 549300V885B988S1LJ49
... 549300WTO22HTNIA0Z19
... 549300X8N7DWRL7VBF44
... 549300XBRMGPGXSSB667
... 549300YBGK6ESSY6G874
... 549300YPYUJBJGNGQO81
... 5967007LIEEXZX850W58
... 6354004RBF2LINM9VH78
... 635400ID2ZOCFWX3LH70
... 635400TSTDEIQBVFXR91
... 7245005BAK6R2JQ1LU94
... 7245006M2FC6DPMC6427
... 724500PVWFYKZIJQAN07
... 815600065E4EA9D08446
... 8156004572781E3F9023
... 815600E6B00CF4DBB722
... 815600FC0039E657C985
... 815600FF404253C67598
... 959800Q824KQDPCZPV58
... 96950091S6OFL0N15G96
... 969500BL7YE3PXKDYT35
... 969500YLLNN3TK3JSF66
... 969500ZAUC3Z50DNZV77
... FIR47I6FEYKYNJBYW622
... GU00WJXK6DH4VHHFXQ16
... NMMFE09VSMAF2TU16C07
... RCJ8N5WH4YK7SVJ4BO12
... TGXITECVNFSIBV316765
... WT03B8BB1IX8WI9ZGV02
... XNIO7KHWR2WD0BP1F484
...
... '''
>>> [x for x in numbers.splitlines() if x and not lei.is_valid(x)]
[]
|