tests: add some docstrings to git submodule tests
authorMarkus Lehtonen <markus.lehtonen@linux.intel.com>
Thu, 5 Sep 2013 15:30:07 +0000 (18:30 +0300)
committerGuido Günther <agx@sigxcpu.org>
Tue, 10 Sep 2013 07:21:35 +0000 (09:21 +0200)
Change-Id: I0ba9e6b59e2a819b5cde1be6fbb53b8ecbb67025
Signed-off-by: Markus Lehtonen <markus.lehtonen@linux.intel.com>
tests/04_test_submodules.py

index 4a9ff39919a196c88ab73a8e3094d9362c5c6820..6e84bdeb5f7543b8e250a084b997543f310e80b9 100644 (file)
@@ -25,6 +25,7 @@ tmpdir = None
 testfile_name = "testfile"
 
 class Submodule(object):
+    """Class representing remote repo for Git submodule"""
     def __init__(self, name, tmpdir):
         self.name = name
         self.dir = os.path.join(tmpdir, name)
@@ -32,6 +33,7 @@ class Submodule(object):
 
 
 def setup():
+    """Test module setup"""
     global repo, repodir, submodules, tmpdir
 
     tmpdir = context.new_tmpdir(__name__)
@@ -45,6 +47,7 @@ def setup():
 
 
 def teardown():
+    """Test module teardown"""
     context.teardown()
 
 def test_empty_has_submodules():
@@ -53,6 +56,7 @@ def test_empty_has_submodules():
 
 
 def _add_dummy_data(repo, msg):
+    """Commit dummy data to a Git repository"""
     shutil.copy(".git/HEAD", testfile_name)
     repo.add_files('.', force=True)
     repo.commit_all(msg)