Moved test stuff around and modified imports to just clean things up a bit.
authorMichael Trier <mtrier@gmail.com>
Thu, 8 May 2008 02:37:17 +0000 (22:37 -0400)
committerMichael Trier <mtrier@gmail.com>
Thu, 8 May 2008 02:37:17 +0000 (22:37 -0400)
16 files changed:
lib/git_python/__init__.py
test/git/test_actor.py
test/git/test_blob.py
test/git/test_commit.py
test/git/test_diff.py
test/git/test_git.py
test/git/test_head.py
test/git/test_repo.py
test/git/test_stats.py
test/git/test_tag.py
test/git/test_tree.py
test/git/test_utils.py
test/helper.py [deleted file]
test/testlib/__init__.py [new file with mode: 0644]
test/testlib/asserts.py [moved from test/asserts.py with 100% similarity]
test/testlib/helper.py [new file with mode: 0644]

index 404cea120c3e485c1be5be7d5221cc9abd05392f..71142a400ba79be06956873b2c395e9ca08e1571 100644 (file)
@@ -1,17 +1,17 @@
 import inspect
 
-from actor import Actor
-from blob import Blob
-from commit import Commit
-from diff import Diff
-from errors import InvalidGitRepositoryError, NoSuchPathError
-from git import Git
-from head import Head
-from repo import Repo
-from stats import Stats
-from tag import Tag
-from tree import Tree
-from utils import shell_escape, dashify, touch
+from git_python.actor import Actor
+from git_python.blob import Blob
+from git_python.commit import Commit
+from git_python.diff import Diff
+from git_python.errors import InvalidGitRepositoryError, NoSuchPathError
+from git_python.git import Git
+from git_python.head import Head
+from git_python.repo import Repo
+from git_python.stats import Stats
+from git_python.tag import Tag
+from git_python.tree import Tree
+from git_python.utils import shell_escape, dashify, touch
 
 __all__ = [ name for name, obj in locals().items()
             if not (name.startswith('_') or inspect.ismodule(obj)) ]
index 2fc7781f3f015f5f11926aa968051bdd66e4679f..14b78f19ac1d72803f53e6285cd97774d692c2f4 100644 (file)
@@ -1,7 +1,6 @@
 import os
-from test.asserts import *
+from test.testlib import *
 from git_python import *
-from test.helper import *
 
 class TestActor(object):
     def test_from_string_should_separate_name_and_email(self):
index f41429a6851ba2ad748ad3ffa01b025cb7aebdfc..1d84e1d8246ca83056314ef74f9bef15dad30aa5 100644 (file)
@@ -1,8 +1,6 @@
 import time
-from mock import *
-from test.asserts import *
+from test.testlib import *
 from git_python import *
-from test.helper import *
 
 class TestBlob(object):
     def setup(self):
index 825eba5a8f304bc8e99719d454c729477952cbd1..65e92812fa00679c530af347b5743bfb2421eb8a 100644 (file)
@@ -1,7 +1,5 @@
-from mock import *
-from test.asserts import *
+from test.testlib import *
 from git_python import *
-from test.helper import *
 
 class TestCommit(object):
     def setup(self):
index c9352a1803198241d676cf5d623b054cd99a0736..b605edddc553d278ef4eb2a6d9408d379a49d59d 100644 (file)
@@ -1,6 +1,5 @@
-from test.asserts import *
+from test.testlib import *
 from git_python import *
-from test.helper import *
 
 class TestDiff(object):
     def setup(self):
index 973f242ad1c93750a303092a0eea6bb4ab82d5eb..0634a5ddf339c9fa257136591fc384523233e4d7 100644 (file)
@@ -1,8 +1,6 @@
 import os
-from mock import *
-from test.asserts import *
+from test.testlib import *
 from git_python import *
-from test.helper import *
 
 class TestGit(object):
     def setup(self):
index fff3c0a0da317a9fc345906563356438360074f3..47cfb60895ee2662722ebcc1d044b09308972958 100644 (file)
@@ -1,7 +1,5 @@
-from mock import *
-from test.asserts import *
+from test.testlib import *
 from git_python import *
-from test.helper import *
 
 class TestHead(object):
     def setup(self):
index 09238c667aaaa284f9d03c17c4aea771054bd8af..af5678110f1173ff12753f127c0dd8f265f8541d 100644 (file)
@@ -1,9 +1,7 @@
 import os
 import time
-from mock import *
-from test.asserts import *
+from test.testlib import *
 from git_python import *
-from test.helper import *
 
 class TestRepo(object):
     def setup(self):
index 36e35e4065817c503f545519bcb4808ce7a2bbf3..4926ac4f50a4532988136ed86a97b6fd5657a3a5 100644 (file)
@@ -1,6 +1,5 @@
-from test.asserts import *
+from test.testlib import *
 from git_python import *
-from test.helper import *
 
 class TestStats(object):
     def setup(self):
index 14a0990db542a3be29bc753cbd9a46431737d561..fb9613c8c5cca81e169b478c4c1db5b47bbf6c61 100644 (file)
@@ -1,7 +1,7 @@
 from mock import *
-from test.asserts import *
-from git_python import *
+from test.testlib import *
 from test.helper import *
+from git_python import *
 
 class TestTag(object):
     def setup(self):
index 3739a704b637b7e5ad329b5f71449cafb23beb27..5d8dea678a648ef077a4b81105eda9978d7d2bfb 100644 (file)
@@ -1,7 +1,5 @@
-from mock import *
-from test.asserts import *
+from test.testlib import *
 from git_python import *
-from test.helper import *
 
 class TestTree(object):
     def setup(self):
index e3b23b2aaa6493a78275e3c667ab931ed2c4dce9..a9af20404642ae5576b19b57d9f21ede22f1a8ec 100644 (file)
@@ -1,7 +1,6 @@
 import os
-from test.asserts import *
+from test.testlib import *
 from git_python import *
-from test.helper import *
 
 class TestUtils(object):
     def setup(self):
diff --git a/test/helper.py b/test/helper.py
deleted file mode 100644 (file)
index 082e57e..0000000
+++ /dev/null
@@ -1,10 +0,0 @@
-import os
-
-GIT_REPO = os.path.join(os.path.dirname(__file__), "..")
-
-def fixture(name):    
-    file = open(os.path.join(os.path.dirname(__file__), "fixtures", name))
-    return file.read()
-
-def absolute_project_path():
-    return os.path.abspath(os.path.join(os.path.dirname(__file__), ".."))
\ No newline at end of file
diff --git a/test/testlib/__init__.py b/test/testlib/__init__.py
new file mode 100644 (file)
index 0000000..3662435
--- /dev/null
@@ -0,0 +1,7 @@
+import inspect
+from mock import *
+from asserts import *
+from helper import *
+
+__all__ = [ name for name, obj in locals().items()
+            if not (name.startswith('_') or inspect.ismodule(obj)) ]
similarity index 100%
rename from test/asserts.py
rename to test/testlib/asserts.py
diff --git a/test/testlib/helper.py b/test/testlib/helper.py
new file mode 100644 (file)
index 0000000..19cff8f
--- /dev/null
@@ -0,0 +1,10 @@
+import os
+
+GIT_REPO = os.path.join(os.path.dirname(__file__), "..", "..")
+
+def fixture(name):    
+    file = open(os.path.join(os.path.dirname(__file__), "..", "fixtures", name))
+    return file.read()
+
+def absolute_project_path():
+    return os.path.abspath(os.path.join(os.path.dirname(__file__), "..", ".."))
\ No newline at end of file