From 7cc4d748a132377ffe63534e9777d7541a3253c5 Mon Sep 17 00:00:00 2001 From: Sebastian Thiel Date: Wed, 17 Nov 2010 21:33:33 +0100 Subject: repo: Added create_submodule method which fits into the tradition of offering a create_* method for most important entities. Moved implementation of smart update method to the RootModule implementation, where it may do special things without requiring an interface for everything --- test/git/test_repo.py | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'test/git/test_repo.py') diff --git a/test/git/test_repo.py b/test/git/test_repo.py index 2acccced..fb6e1450 100644 --- a/test/git/test_repo.py +++ b/test/git/test_repo.py @@ -570,4 +570,9 @@ class TestRepo(TestBase): self.failUnlessRaises(InvalidGitRepositoryError, rwrepo.submodule_update) rwrepo._bare = False + # test create submodule + sm = rwrepo.submodules[0] + sm = rwrepo.create_submodule("my_new_sub", "some_path", join_path_native(self.rorepo.working_tree_dir, sm.path)) + assert isinstance(sm, Submodule) + -- cgit v1.2.1