diff options
author | alexv-smirnov <alex@ydb.tech> | 2023-06-13 11:05:01 +0300 |
---|---|---|
committer | alexv-smirnov <alex@ydb.tech> | 2023-06-13 11:05:01 +0300 |
commit | bf0f13dd39ee3e65092ba3572bb5b1fcd125dcd0 (patch) | |
tree | 1d1df72c0541a59a81439842f46d95396d3e7189 /build/plugins/lib/nots/package_manager/base/tests/utils.py | |
parent | 8bfdfa9a9bd19bddbc58d888e180fbd1218681be (diff) | |
download | ydb-bf0f13dd39ee3e65092ba3572bb5b1fcd125dcd0.tar.gz |
add ymake export to ydb
Diffstat (limited to 'build/plugins/lib/nots/package_manager/base/tests/utils.py')
-rw-r--r-- | build/plugins/lib/nots/package_manager/base/tests/utils.py | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/build/plugins/lib/nots/package_manager/base/tests/utils.py b/build/plugins/lib/nots/package_manager/base/tests/utils.py new file mode 100644 index 0000000000..4287beec47 --- /dev/null +++ b/build/plugins/lib/nots/package_manager/base/tests/utils.py @@ -0,0 +1,15 @@ +from build.plugins.lib.nots.package_manager.base import utils + + +def test_extract_package_name_from_path(): + happy_checklist = [ + ("@yandex-int/foo-bar-baz/some/path/inside/the/package", "@yandex-int/foo-bar-baz"), + ("@yandex-int/foo-bar-buzz", "@yandex-int/foo-bar-buzz"), + ("package-wo-scope", "package-wo-scope"), + ("p", "p"), + ("", ""), + ] + + for item in happy_checklist: + package_name = utils.extract_package_name_from_path(item[0]) + assert package_name == item[1] |