| 12
 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
 137
 138
 139
 140
 141
 142
 143
 144
 145
 146
 147
 148
 149
 150
 151
 152
 153
 154
 155
 156
 157
 158
 159
 160
 161
 162
 163
 164
 165
 166
 167
 168
 169
 170
 171
 172
 173
 174
 175
 176
 177
 178
 179
 180
 181
 182
 183
 184
 185
 186
 187
 188
 189
 190
 191
 192
 193
 194
 195
 196
 197
 198
 199
 200
 201
 202
 203
 204
 205
 206
 207
 208
 209
 210
 211
 212
 213
 214
 215
 216
 217
 218
 219
 220
 221
 222
 223
 224
 225
 226
 227
 228
 229
 230
 231
 232
 233
 234
 
 | test_tr_vkn.doctest - more detailed doctests stdnum.tr.vkn
Copyright (C) 2019 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.tr.vkn module.
>>> from stdnum.tr import vkn
>>> from stdnum.exceptions import *
These have been found online and should all be valid numbers.
>>> numbers = '''
...
... 0010213576
... 0010441520
... 0010448542
... 0010526814
... 0010715980
... 0080463579
... 0080527931
... 0080545022
... 0180044810
... 0280352329
... 0340251667
... 0380372431
... 0470075367
... 0620203425
... 0680581023
... 0690039813
... 0730335205
... 0740002937
... 0740369686
... 0790015205
... 0920235639
... 0990287814
... 0990379907
... 0990382513
... 0990382597
... 1050060784
... 1150621039
... 1270153817
... 1280263800
... 1290088638
... 1300312226
... 1310481414
... 1500417685
... 1510326126
... 1700226053
... 1750058182
... 1780528417
... 1940338616
... 1940429104
... 2280560506
... 2280737678
... 2310378552
... 2420384723
... 2500315456
... 2590326294
... 2710531441
... 2920458832
... 2920601616
... 3130285045
... 3130406468
... 3180394723
... 3230937581
... 3240021579
... 3240032322
... 3250423480
... 3250498663
... 3250536363
... 3250536865
... 3250560659
... 3250561668
... 3250563197
... 3250564307
... 3250580252
... 3250591649
... 3250592377
... 3260264759
... 3270052074
... 3300554789
... 3320090910
... 3320414886
... 3320419067
... 3330047498
... 3330191867
... 3330514325
... 3330670860
... 3330738293
... 3330784342
... 3340346552
... 3340512339
... 3340521306
... 3340522042
... 3340532391
... 3350427318
... 3360098602
... 3410209992
... 3410224231
... 3410262599
... 3440302137
... 3460048369
... 3470145206
... 3580294398
... 3600179137
... 3620269055
... 3670040942
... 3700035475
... 3710206507
... 3720054396
... 3730264222
... 3760112760
... 3770333705
... 3770335008
... 3770347068
... 3770407303
... 3770440816
... 3790331602
... 3800363074
... 3800387813
... 3800459988
... 3800548119
... 3810421550
... 3810435695
... 3810463834
... 3820141922
... 3820216458
... 3880430565
... 3890039548
... 3890382536
... 3900499834
... 4000209998
... 4070322093
... 4110245403
... 4560329085
... 4560337988
... 4560340440
... 4570274865
... 4580413166
... 4630340765
... 4730259742
... 4730262973
... 4740097221
... 4740288671
... 4780392711
... 4780393657
... 4840500630
... 4840507506
... 4840515027
... 4910300757
... 4960273835
... 5200337887
... 5200397587
... 5240377967
... 5250033700
... 5260407279
... 5400299723
... 5410386127
... 5600419358
... 5770389835
... 5820358439
... 6080300655
... 6090213592
... 6100274226
... 6130847655
... 6170213752
... 6170305692
... 6170380379
... 6210184261
... 6210288834
... 6240292044
... 6270283511
... 6310391942
... 6320201497
... 6340308307
... 6420017049
... 6510412161
... 6550254004
... 6600296871
... 6850437587
... 7080351714
... 7230309848
... 7280054028
... 7420306235
... 7440382217
... 7660381981
... 7700021408
... 7700294084
... 7710094113
... 7810147439
... 7820457441
... 7860191073
... 8010405749
... 8110348947
... 8140161095
... 8150130896
... 8290246945
... 8440247028
... 8450208011
... 8580348375
... 8630017816
... 8720064947
... 8730268699
... 8870198191
... 9030505934
... 9190297092
... 9480321929
... 9510380570
... 9840234403
... 9950395531
... 9980588799
... 9980697606
... 9990112519
...
... '''
>>> [x for x in numbers.splitlines() if x and not vkn.is_valid(x)]
[]
 |