python-stdnum branch master updated. 1.17-57-g7348c7a
[
Date Prev][
Date Next]
[
Thread Prev][
Thread Next]
python-stdnum branch master updated. 1.17-57-g7348c7a
- From: Commits of the python-stdnum project <python-stdnum-commits [at] lists.arthurdejong.org>
- To: python-stdnum-commits [at] lists.arthurdejong.org
- Reply-to: python-stdnum-users [at] lists.arthurdejong.org, python-stdnum-commits [at] lists.arthurdejong.org
- Subject: python-stdnum branch master updated. 1.17-57-g7348c7a
- Date: Sun, 13 Nov 2022 17:07:52 +0100 (CET)
This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "python-stdnum".
The branch, master has been updated
via 7348c7a40541ff59bff309fec512f7476fd8ca3b (commit)
from fa62ea3f7862fd000bb11b62e338ff25bfc3af7d (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.
- Log -----------------------------------------------------------------
https://arthurdejong.org/git/python-stdnum/commit/?id=7348c7a40541ff59bff309fec512f7476fd8ca3b
commit 7348c7a40541ff59bff309fec512f7476fd8ca3b
Author: Leandro Regueiro <leandro.regueiro@gmail.com>
Date: Tue Sep 6 20:00:36 2022 +0200
vatin: Add a few more tests for is_valid
See https://github.com/arthurdejong/python-stdnum/pull/316
diff --git a/tests/test_vatin.doctest b/tests/test_vatin.doctest
index 4d785c3..44dc38d 100644
--- a/tests/test_vatin.doctest
+++ b/tests/test_vatin.doctest
@@ -78,3 +78,21 @@ InvalidComponent: ...
Traceback (most recent call last):
...
InvalidComponent: ...
+
+
+Check is_valid for several scenarios:
+
+>>> vatin.is_valid('FR 40 303 265 045')
+True
+>>> vatin.is_valid('FR 40 303')
+False
+>>> vatin.is_valid('FR')
+False
+>>> vatin.is_valid('')
+False
+>>> vatin.is_valid('00')
+False
+>>> vatin.is_valid('XX')
+False
+>>> vatin.is_valid('US')
+False
-----------------------------------------------------------------------
Summary of changes:
tests/test_vatin.doctest | 18 ++++++++++++++++++
1 file changed, 18 insertions(+)
hooks/post-receive
--
python-stdnum
- python-stdnum branch master updated. 1.17-57-g7348c7a,
Commits of the python-stdnum project