-
Notifications
You must be signed in to change notification settings - Fork 85
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* chore: Update devbox tooling * Fix national check digit calculationn for Poland * Ensure bank registry has valid bank_code * chore: Add more specific type annotations * Addd IBAN/BBAN.random() * chore: Fix checksum algo for estonia * chore: Use Python 3.8 compliant type expression in cast
- Loading branch information
Showing
7 changed files
with
161 additions
and
36 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
import pytest | ||
|
||
from schwifty.bban import BBAN | ||
|
||
|
||
@pytest.mark.parametrize("country_code", ["DE", "ES", "GB", "FR", "PL"]) | ||
def test_random(country_code: str) -> None: | ||
n = 100 | ||
bbans = {BBAN.random(country_code) for _ in range(n)} | ||
assert len(bbans) == n | ||
|
||
for bban in bbans: | ||
assert bban.bank is not None | ||
assert bban.country_code == country_code |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters