Skip to content

Commit 943ce79

Browse files
committed
add test
1 parent 849778d commit 943ce79

1 file changed

Lines changed: 10 additions & 1 deletion

File tree

.generator/test_cli.py

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1357,7 +1357,7 @@ def test_verify_library_namespace_error_no_gapic_file(mocker, mock_path_class):
13571357
mock_path_class.assert_called_once_with("repo/packages/my-lib")
13581358

13591359

1360-
def test_get_staging_child_directory_gapic():
1360+
def test_get_staging_child_directory_gapic_versioned():
13611361
"""
13621362
Tests the behavior for GAPIC clients with standard 'v' prefix versioning.
13631363
Should return only the version segment (e.g., 'v1').
@@ -1367,6 +1367,15 @@ def test_get_staging_child_directory_gapic():
13671367
expected = "v1"
13681368
assert _get_staging_child_directory(api_path, False) == expected
13691369

1370+
def test_get_staging_child_directory_gapic_non_versioned():
1371+
"""
1372+
Tests the behavior for GAPIC clients with no standard 'v' prefix versioning.
1373+
Should return library-py
1374+
"""
1375+
api_path = "google/cloud/language"
1376+
expected = "language-py"
1377+
assert _get_staging_child_directory(api_path, False) == expected
1378+
13701379

13711380
def test_get_staging_child_directory_proto_only():
13721381
"""

0 commit comments

Comments
 (0)