Rename and comment tests
authorGuido Günther <agx@sigxcpu.org>
Wed, 28 Dec 2011 21:04:03 +0000 (22:04 +0100)
committerGuido Günther <agx@sigxcpu.org>
Thu, 29 Dec 2011 08:45:15 +0000 (09:45 +0100)
Git-Dch: Ignore

tests/01_test_help.py
tests/02_test_upstream_source_tar_unpack.py [moved from tests/02_test_import.py with 98% similarity]
tests/03_test_dch_guess_version.py
tests/04_test_submodules.py [moved from tests/04_test_gbp_submodules.py with 98% similarity]
tests/05_test_detection.py
tests/06_test_upstream_source.py
tests/07_test_fastimport.py
tests/08_test_patch.py

index 02b19c8..cee7911 100644 (file)
@@ -1,6 +1,6 @@
 # vim: set fileencoding=utf-8 :
-#
-# check if --help works
+
+"""Check if --help works"""
 
 import os
 import unittest
similarity index 98%
rename from tests/02_test_import.py
rename to tests/02_test_upstream_source_tar_unpack.py
index 6ded95a..9366dd9 100644 (file)
@@ -1,5 +1,7 @@
 # vim: set fileencoding=utf-8 :
 
+"""Test L{UpstreamSource}'s tarball unpack"""
+
 import glob
 import os
 import shutil
index 1034307..d954459 100644 (file)
@@ -1,3 +1,7 @@
+# vim: set fileencoding=utf-8 :
+
+"""Test L{Changelog}'s guess_version_from_upstream"""
+
 import unittest
 
 from gbp.scripts import dch
@@ -28,7 +32,7 @@ class MockedChangeLog(ChangeLog):
 
 
 class TestGuessVersionFromUpstream(unittest.TestCase):
-    """Dest guess_version_from_upstream"""
+    """Test guess_version_from_upstream"""
     def test_guess_no_epoch(self):
         """Guess the new version from the upstream tag"""
         repo = MockGitRepository(upstream_tag='upstream/1.1')
similarity index 98%
rename from tests/04_test_gbp_submodules.py
rename to tests/04_test_submodules.py
index a20f668..5ae1f5f 100644 (file)
@@ -1,5 +1,7 @@
 # vim: set fileencoding=utf-8 :
 
+"""Test submodule L{GitRepository} submodule methods"""
+
 import os
 import shutil
 import tarfile
index 2f58265..d866d7d 100644 (file)
@@ -1,3 +1,7 @@
+# vim: set fileencoding=utf-8 :
+
+"""Test tarball compression type detection"""
+
 import os
 import shutil
 import tempfile
index e414fa4..96402f4 100644 (file)
@@ -1,4 +1,6 @@
-# Test the UpstreamSource class
+# vim: set fileencoding=utf-8 :
+
+"""Test the L{UpstreamSource} class"""
 
 import glob
 import os
@@ -20,6 +22,7 @@ class TestDir(unittest.TestCase):
 
 
 class TestTar(unittest.TestCase):
+    """Test if packing tar archives works"""
     def _check_tar(self, us, positive=[], negative=[]):
         t = tarfile.open(name=us.path, mode="r:bz2")
         for f in positive:
@@ -64,6 +67,7 @@ class TestTar(unittest.TestCase):
 
 
 class TestZip(unittest.TestCase):
+    """Test if unpacking zip archives works"""
     def setUp(self):
         self.tmpdir = tempfile.mkdtemp(prefix='gbp_%s_' % __name__, dir='.')
         self.zipfile = os.path.join(self.tmpdir, "gbp-0.1.zip")
index cfb560f..7e38bf2 100644 (file)
@@ -1,5 +1,7 @@
 # vim: set fileencoding=utf-8 :
 
+"""Test L{FastImport} class"""
+
 import os
 import shutil
 import tarfile
index 8735b16..92a6739 100644 (file)
@@ -1,3 +1,7 @@
+# vim: set fileencoding=utf-8 :
+
+"""Test L{Patch} class"""
+
 import os
 import unittest