diff options
author | spreis <spreis@yandex-team.ru> | 2022-05-04 16:07:57 +0300 |
---|---|---|
committer | spreis <spreis@yandex-team.ru> | 2022-05-04 16:07:57 +0300 |
commit | 2bf267dc25ea20521a562ebca8bf5c57af7be290 (patch) | |
tree | f07850976fccf00bd42d90be15c12576eee3b0cf /library/python/svn_version/ut | |
parent | 4b3463e0a8c1b2c11eb8cd38f359e554f63e7a33 (diff) | |
download | ydb-2bf267dc25ea20521a562ebca8bf5c57af7be290.tar.gz |
Introduce method to get vcs in library/python/svn_version
ref:3cdcb0b0558a4896ab20082ec37672275dfe59b9
Diffstat (limited to 'library/python/svn_version/ut')
-rw-r--r-- | library/python/svn_version/ut/test_simple.py | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/library/python/svn_version/ut/test_simple.py b/library/python/svn_version/ut/test_simple.py index 0eb94ccbbc..50fa78f55d 100644 --- a/library/python/svn_version/ut/test_simple.py +++ b/library/python/svn_version/ut/test_simple.py @@ -5,12 +5,16 @@ def test_simple(): assert sv.svn_version() assert isinstance(sv.svn_version(), str) - # svn_revision() will be equal to zero on non-trunk commits - assert sv.svn_revision() >= 0 + 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 + 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() |