Arthur de Jong

Open Source / Free Software developer

summaryrefslogtreecommitdiffstats
path: root/tests
Commit message (Collapse)AuthorAgeFilesLines
* Fix Czech DIČ check digit calculationArthur de Jong2017-09-081-0/+12
| | | | | | | | This fixes a bug in the check digit calculation for the 9-digit numbers that start with a 6 for individuals without a RČ. This also adds a few tests for Czech VAT numbers. See https://github.com/arthurdejong/python-stdnum/issues/51
* Add Estonian RegistrikoodArthur de Jong2017-09-041-0/+148
| | | | | | | | | This is based on what was done by Mohammed Salman of Holvi. This adds more tests and validates the check digit. This uses the check digit algorithm from Isikukood which seems to work with all tested numbers although there is no confirmation that this is the correct algorithm.
* Add support for German tax id numberMohammed Salman2017-09-031-0/+66
|
* Check bookland code in ISBNArthur de Jong2017-08-301-3/+7
| | | | | | This ensures that an InvalidComponent() exception is raised when an unknown EAN bookland code is found. It will also raise this exception when using to_isbn10() when not using the 978 code.
* Ensure 100% branch coverageArthur de Jong2017-08-282-0/+51
| | | | | | | | | | | This ensures that the tests fail if 100% branch coverage is not achieved. It also adds some pragma statements for code that cannot be covered or is Python version dependent. Furthermore, the get_module_list() function was removed from stdnum.util and more tests were made from stdnum.util and stdnum.numdb. The functionality to call format() in a country-specific IBAN implementation was also dropped because it was not used.
* Add Canadian Business Number (BN)Arthur de Jong2017-08-261-0/+151
|
* Add a few ISBNs found onlineArthur de Jong2017-04-161-0/+210
| | | | | This adds a number of ISBNs found online from various sources to the test suite.
* An ISMN can only be 10 or 13 digitsArthur de Jong2017-04-151-3/+17
| | | | This also adds the test that an ISMN should start with 9790.
* Fix conversion of 9 digit ISBN to ISBN13Arthur de Jong2017-04-151-1/+9
|
* Switch to HTTPS URLsArthur de Jong2017-04-131-2/+2
|
* Add Legal Entity IdentifierArthur de Jong2017-04-101-0/+134
|
* Add Serbian Poreski Identifikacioni BrojArthur de Jong2017-04-101-0/+134
|
* Add European EIC (Energy Identification Code)Arthur de Jong2017-04-011-0/+118
|
* Add unicode robustness testsArthur de Jong2017-04-011-1/+3
| | | | This tests a few unicode strings and fixes a bug in the MEID module.
* Add test for Ñ in Referencia CatastralArthur de Jong2017-04-011-1/+23
| | | | | | | | | | | This supports the Referencia Catastral with an Ñ in it for both byte strings (Python 2) and unicode strings (Python 2 and 3). Support for literal unicode strings in Python 2 doctests is flaky so the test is a bit ugly. This also adds a few numbers that were found online. Sadly no real numbers with an Ñ in it have been found so the one in the test was constructed.
* Add European NACE classificationArthur de Jong2017-03-261-2/+2
| | | | | This number is used to classify business. Validation is done based on a downloaded registry.
* Add support for Monaco VAT numberArthur de Jong2017-03-251-1/+25
| | | | | | | The number uses the French TVA number but, unlike normal French VAT numbers, they are not valid French SIREN numbers. See https://github.com/arthurdejong/python-stdnum/issues/46
* Implement CBU (unique bank code) of ArgentinaLuciano Rossi2016-11-151-0/+79
| | | | See https://github.com/arthurdejong/python-stdnum/issues/43
* Add Python 2.6 supportArthur de Jong2016-11-141-1/+1
| | | | | This also brings the list of Python versions in setup.py in line with tox.ini.
* Update database filesArthur de Jong2016-11-131-1/+0
| | | | | | This removes the Costa Rica IBAN test because the format of the IBAN seems to have been changed. The old length still seems to be in use so a more permanent solution is probably required.
* Add Australian Tax File NumberArthur de Jong2016-10-141-0/+42
| | | | | | | Based on the implementation provided by Vincent Bastos <vincent@lavalab.com.au> See https://github.com/arthurdejong/python-stdnum/pull/40
* Add Australian Company NumberArthur de Jong2016-10-141-0/+125
| | | | | | | Based on the implementation provided by Vincent Bastos <vincent@lavalab.com.au> See https://github.com/arthurdejong/python-stdnum/pull/40
* Add Australian Business NumberArthur de Jong2016-10-141-0/+136
| | | | | | | Based on the implementation provided by Vincent Bastos <vincent@lavalab.com.au> See https://github.com/arthurdejong/python-stdnum/pull/40
* Add more tests for Referencia CatastralArthur de Jong2016-09-101-0/+295
| | | | | | | | | | | This adds a number of extra tests for the Spanish Referencia Catastral (stdnum.es.referenciacatastral) module, mostly based on numbers found online. This commit includes some of the documentation on the structure of Referencia Catastral that was in the original pull request. See https://github.com/arthurdejong/python-stdnum/pull/38
* Test a few Spanish IBANs found onlineArthur de Jong2016-09-101-0/+24
|
* Add Spanish IBAN number moduleArthur de Jong2016-09-101-0/+12
| | | | This validates the country-specific part of the IBAN.
* Add Spanish CUPS codeDavid García Garzón2016-09-031-0/+83
|
* Implement Damm algorithmArthur de Jong2016-07-261-0/+93
| | | This is a generic check digit algorithm.
* Add extra tests for SIREN and SIRETArthur de Jong2016-07-252-0/+132
| | | | | | | | This adds tests for a few numbers that have been found online and allows the dot as a seprator because those numbers were found. It also ensures that the SIREN validation is also called for SIRET and adds a SIRET formatting function.
* Add more ISIL testsArthur de Jong2016-05-291-0/+404
| | | | | This moves a few of the tests from the module to a dedicated test file and adds tests for a number of ISIL numbers found online.
* Fix bug in Swiss SSN validationArthur de Jong2016-05-281-0/+33
| | | | | | | The validation was delegated to the EAN module but the number is supposed to be an EAN-13 only and and EAN-8 was also accepted. This also reformats the docstring.
* Fix bug in Irish VAT number validationArthur de Jong2016-05-281-0/+48
| | | | | | | | | | | The last digits of the number that should be letters were not tested to be letters which could result in ValueError being raised for certain validations. This also clarifies the documentation and adds a convert() function to convert numbers from the old format (where the second character would be a letter or symbol) to the new format (7 digits followed by 1 or 2 letters).
* Small improvements to testsArthur de Jong2016-05-281-3/+2
| | | | | This includes a formatting fix and removes an unused variable from a test.
* Add Turkish personal identification numberArthur de Jong2016-04-091-0/+234
|
* Document accuracy of RFC check digit testArthur de Jong2016-04-011-6/+3
| | | | | | | | There is an online service that allows validating RFC numbers. It seems there are a lot of numbers that do not match the check digit algorithm which confirms disabling the check digit test by default is a good idea. Also see https://github.com/arthurdejong/python-stdnum/issues/32
* Fix for when ISO 6346 checksum is 10Ronald Paloschi2015-10-161-0/+2
| | | | | | | Bug fix for when the checksum is 10, it was compared to 0 and failed. New doctest exposing the bug that passes after the fix is applied. See: https://github.com/arthurdejong/python-stdnum/pull/30
* Add German WertpapierkennnummerArthur de Jong2015-10-111-0/+233
| | | | | The format itself is pretty simple (no check digit) but this module is more for completeness sake.
* Add SEDOL numberArthur de Jong2015-10-101-0/+255
|
* Move numdb test fileArthur de Jong2015-10-101-0/+8
| | | | This places the test database file in the tests directory.
* Fix handling of strip_check_digits in ISANArthur de Jong2015-10-101-0/+12
| | | | | | This fixes the compact() function to honor the strip_check_digits argument and does not validate the check digits if they are passed to validate together with strip_check_digits.
* Add international securities id (ISIN)Arthur de Jong2015-10-101-0/+343
| | | | | | This adds support for handling ISINs (International Securities Identification Number). The can contain a CUSIP but performing this additional validation is currently not performed.
* Add CUSIP numberArthur de Jong2015-10-091-0/+249
|
* Add Swiss UID and VAT numbersArthur de Jong2015-10-082-0/+251
| | | | | | The Swiss VAT number (MWST, TVA, IVA, TPV) is the UID (Unternehmens-Identifikationsnummer) followed by one of the VAT abbreviations.
* Add Mexican RFC numberArthur de Jong2015-10-051-0/+531
| | | | | | | | | | This adds support for the Mexican tax number RFC (Registro Federal de Contribuyentes). This module includes a number of checks on the number but the validation of the last check digit is disabled by default because a large number of numbers were found that were otherwise valid but had an invalid check digit.
* Update Colombian NIT checksArthur de Jong2015-10-051-0/+298
| | | | | | | | | This adds a number of tests for numbers found online. The length check has also been revisited because both shorter numbers and longer number have been found. This also updates the format() function to handle arbitrary length numbers.
* Add more numbers found onlineArthur de Jong2015-10-051-8/+51
|
* Add Polish REGON numberDariusz Choruzy2015-09-271-0/+104
|
* Add Russioan ИНН (INN) tax IDArthur de Jong2015-08-161-0/+59
| | | | | | | This adds a basic implementation of the Russian Идентификационный номер налогоплательщика (tax identification number). This currently only checks the format, length and check digits but not whether each of the parts of the number are valid (e.g. valid region specified).
* Add Brazillian CNPJ business identifierArthur de Jong2015-08-161-0/+60
| | | | | Add module for Cadastro Nacional da Pessoa Jurídica, the Brazillian company identifier.
* Update IBAN testsArthur de Jong2015-08-161-69/+86
| | | | | | This updates the iban.dat file from the IBAN registry, includes a fix for handling spaces in the BBAN and adds some more IBAN examples from the IBAN registry.