Changeset View
Changeset View
Standalone View
Standalone View
swh/loader/svn/tests/test_utils.py
Show First 20 Lines • Show All 402 Lines • ▼ Show 20 Lines | [ | ||||
"http://svn.example.org/repos/test", | "http://svn.example.org/repos/test", | ||||
( | ( | ||||
"C:\\code\\repo\\external", | "C:\\code\\repo\\external", | ||||
"http://svn.thirdparty.com/repos/test", | "http://svn.thirdparty.com/repos/test", | ||||
None, | None, | ||||
False, | False, | ||||
), | ), | ||||
), | ), | ||||
( | |||||
"-r 123 http://svn.example.com/repos/sounds@100 third-party/sounds", | |||||
"trunk/externals", | |||||
"http://svn.example.org/repos/test", | |||||
("third-party/sounds", "http://svn.example.com/repos/sounds", 123, False), | |||||
), | |||||
( | |||||
"-r 123 http://svn.example.com/repos/sounds@150 third-party/sounds", | |||||
"trunk/externals", | |||||
"http://svn.example.org/repos/test", | |||||
("third-party/sounds", "http://svn.example.com/repos/sounds", 123, False), | |||||
), | |||||
], | ], | ||||
) | ) | ||||
def test_parse_external_definition(external, dir_path, repo_url, expected_result): | def test_parse_external_definition(external, dir_path, repo_url, expected_result): | ||||
assert ( | assert ( | ||||
utils.parse_external_definition(external, dir_path, repo_url) == expected_result | utils.parse_external_definition(external, dir_path, repo_url) == expected_result | ||||
) | ) |