When cloning from a namespaced repository, the clone_config template may wish to use the module with and without the namespace prefix. Use the get_base_module() function to extract base_module and expand it when found in a clone_config template.
Resolves: #326 Signed-off-by: Todd Zullinger tmz@pobox.com
This test name confuses me because I can't easily get the point of what it tests. Could you please reconsider and reword it?
Looks good to me except the test name.
Sure. What about test_clone_config_template_uses_base_module or test_clone_config_template_accepts_base_module ? Either could also have _var appended to make it clearer that base_module is a variable.
test_clone_config_template_uses_base_module
test_clone_config_template_accepts_base_module
_var
base_module
Thanks.
@tmz test_clone_config_template_accepts_base_module looks good.
rebased onto d2ebfaee99f0a0d72a987a38a39015143d02330f
Thanks @cqi. I updated my branch with that name.
Looks good to me.
why is pyrpkg imported in (almost) every test-case individually? I would prefer one import per file in this case.
Good point. This should be a technical debt in the code. It can be fixed in a separate PR I think.
BTW, I would prefer to rewrite legacy tests based on utils.CommandTestCase that could help to avoid the duplicate and ease the code of self.make_new_git(self.module) and cmd = pyrpkg.Commands(...). This is out of this PR scope. We can fix it later.
utils.CommandTestCase
self.make_new_git(self.module)
cmd = pyrpkg.Commands(...)
Going to merge. Thank you all. :tada:
Commit 2aba7d23 fixes this pull-request
Pull-Request has been merged by cqi
When cloning from a namespaced repository, the clone_config template may
wish to use the module with and without the namespace prefix. Use the
get_base_module() function to extract base_module and expand it when
found in a clone_config template.
Resolves: #326
Signed-off-by: Todd Zullinger tmz@pobox.com