Arthur de Jong

Open Source / Free Software developer

summaryrefslogtreecommitdiffstats
path: root/stdnum/iban.py
diff options
context:
space:
mode:
authorArthur de Jong <arthur@arthurdejong.org>2017-08-28 20:26:38 +0200
committerArthur de Jong <arthur@arthurdejong.org>2017-08-28 20:26:38 +0200
commit8f6fa7db038a29941b70862386ae4120499637d2 (patch)
tree077cf3bb788174dbd52e630e04887a859fe80e0f /stdnum/iban.py
parentfbc92f8400d4565a86b81329053a1302ce21c2f8 (diff)
Ensure 100% branch coverage
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.
Diffstat (limited to 'stdnum/iban.py')
-rw-r--r--stdnum/iban.py3
1 files changed, 0 insertions, 3 deletions
diff --git a/stdnum/iban.py b/stdnum/iban.py
index a9c56b3..5908a71 100644
--- a/stdnum/iban.py
+++ b/stdnum/iban.py
@@ -129,7 +129,4 @@ def is_valid(number, check_country=True):
def format(number, separator=' '):
"""Reformat the passed number to the space-separated format."""
number = compact(number)
- module = _get_cc_module(number[:2])
- if module and hasattr(module, 'format') and module.format != format:
- return module.format(number, separator=separator)
return separator.join(number[i:i + 4] for i in range(0, len(number), 4))