diff options
author | AlexSm <alex@ydb.tech> | 2024-01-18 11:28:56 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-01-18 11:28:56 +0100 |
commit | 9d0a3761b3201e0d9db879a7adf91876ebdb0564 (patch) | |
tree | 541d11ac878c18efd7ebca81e35112aa0fef995b /library/python/svn_version/ut/test_simple.py | |
parent | 404ef8886ecc9736bc58ade6da2fbd83b486a408 (diff) | |
download | ydb-9d0a3761b3201e0d9db879a7adf91876ebdb0564.tar.gz |
Library import 8 (#1074)
* Library import 8
* Add contrib/libs/cxxsupp/libcxx/include/__verbose_abort
Diffstat (limited to 'library/python/svn_version/ut/test_simple.py')
-rw-r--r-- | library/python/svn_version/ut/test_simple.py | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/library/python/svn_version/ut/test_simple.py b/library/python/svn_version/ut/test_simple.py new file mode 100644 index 0000000000..50fa78f55d --- /dev/null +++ b/library/python/svn_version/ut/test_simple.py @@ -0,0 +1,24 @@ +import library.python.svn_version as sv + + +def test_simple(): + assert sv.svn_version() + assert isinstance(sv.svn_version(), str) + + assert sv.vcs() + assert isinstance(sv.vcs(), str) + + # svn_revision() will be -1 on non-trunk commits via arc + # svn revision of 0 technically may exist, but practiacally it will never appear here + assert sv.svn_revision() >= 0 or (sv.vcs() != "svn" and sv.svn_revision() == -1) + assert isinstance(sv.svn_revision(), int) + + # svn_last_revision() will be equal to zero on non-trunk commits + assert sv.svn_last_revision() >= 0 or (sv.vcs() != "svn" and sv.svn_last_revision() == -1) + assert isinstance(sv.svn_last_revision(), int) + + assert sv.commit_id() + assert isinstance(sv.commit_id(), str) + assert len(sv.commit_id()) > 0 + assert isinstance(sv.hash(), str) + assert isinstance(sv.patch_number(), int) |