test_cl_rut.doctest - more detailed tests for stdnum.cl.rut

Copyright (C) 2015 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.cl.rut module.

>>> from stdnum.cl import rut
>>> from stdnum.exceptions import *


This is a selection of numbers (which should be valid) found at
https://palena.sii.cl/cvc/dte/ee_empresas_emisoras.html

>>> numbers = '''
...
... 10075381-2
... 10219183-8
... 10273665-6
... 10319569-1
... 10402061-5
... 10516143-3
... 10548375-9
... 10626628-K
... 10726809-K
... 10830138-4
... 10860841-2
... 11472349-5
... 11482004-0
... 11605334-9
... 11840208-1
... 11975507-7
... 12150075-2
... 12362626-5
... 12392004-K
... 12415074-4
... 12423920-6
... 12574946-1
... 12584568-1
... 12645789-8
... 12723467-1
... 12790819-2
... 13021498-3
... 13073522-3
... 13095834-6
... 13097057-5
... 13309437-7
... 13490667-7
... 13531984-8
... 13646691-7
... 13674023-7
... 13743324-9
... 13831173-2
... 13908671-6
... 13940679-6
... 13966594-5
... 13972493-3
... 14232760-0
... 14391166-7
... 14676291-3
... 14684927-K
... 14693665-2
... 15187234-4
... 15261623-6
... 15264124-9
... 15450326-9
... 15930050-1
... 16045507-1
... 16607084-8
... 3528355-2
... 4769973-8
... 52000543-9
... 52003746-2
... 5314394-6
... 53311164-5
... 5666126-3
... 5759700-3
... 5843733-6
... 6188994-9
... 6447064-7
... 65700550-9
... 6592333-5
... 7092881-7
... 7116223-0
... 7341194-7
... 7362723-0
... 73968300-9
... 76001215-7
... 76001925-9
... 76005843-2
... 76007743-7
... 76008294-5
... 76009811-6
... 76011739-0
... 76012844-9
... 76014309-K
... 76015107-6
... 76015662-0
... 76016096-2
... 76019921-4
... 76026514-4
... 76026754-6
... 76029043-2
... 76033711-0
... 76035895-9
... 76042275-4
... 76043207-5
... 76043478-7
... 76044777-3
... 76048222-6
... 76049323-6
... 76051527-2
... 76063318-6
... 76069188-7
... 76069621-8
... 76073759-3
... 76077253-4
... 76080924-1
... 76083398-3
... 76094260-K
... 76164130-1
... 76200530-1
... 76200720-7
... 76324600-0
... 76327980-4
... 76375410-3
... 76377670-0
... 76453840-4
... 76461120-9
... 76525260-1
... 76527180-0
... 76563850-K
... 76565840-3
... 76624810-1
... 76650270-9
... 76653690-5
... 76654270-0
... 76670180-9
... 76688170-K
... 76699320-6
... 76724000-7
... 76757480-0
... 76758840-2
... 76760580-3
... 76792810-6
... 76827950-0
... 76884020-2
... 76898760-2
... 76953260-9
... 76968400-K
... 77060220-3
... 77183530-9
... 77248650-2
... 77308020-8
... 77380420-6
... 77413050-0
... 77416300-K
... 7741928-4
... 77451560-7
... 77753800-4
... 77827630-5
... 77948290-1
... 77962630-K
... 77986680-7
... 78006840-K
... 78030800-1
... 78072520-6
... 78207580-2
... 78281650-0
... 78298460-8
... 78432780-9
... 78469000-8
... 78477650-6
... 78558880-0
... 78780430-6
... 78827280-4
... 78861790-9
... 78874150-2
... 79586380-K
... 8005083-6
... 83156400-8
... 8352320-4
... 8378799-6
... 8379191-8
... 8649219-9
... 88830500-9
... 90753000-0
... 91520000-1
... 92648000-6
... 9290661-2
... 9334748-K
... 93698000-7
... 9475529-8
... 9485538-1
... 9506985-1
... 9522447-4
... 9580657-0
... 96626570-1
... 96632300-0
... 96711760-9
... 96721090-0
... 96779280-2
... 96813830-8
... 96837220-3
... 96919970-K
... 96930440-6
... 96953410-K
... 96967100-K
... 9890042-K
... 9896013-9
... 99147000-K
... 99512950-7
... 99540200-9
... 99561530-4
... 99568510-8
... 99595090-1
...
... '''
>>> [x for x in numbers.splitlines() if x and not rut.is_valid(x)]
[]