diff options
-rw-r--r-- | lib/git_python/__init__.py | 24 | ||||
-rw-r--r-- | test/git/test_actor.py | 3 | ||||
-rw-r--r-- | test/git/test_blob.py | 4 | ||||
-rw-r--r-- | test/git/test_commit.py | 4 | ||||
-rw-r--r-- | test/git/test_diff.py | 3 | ||||
-rw-r--r-- | test/git/test_git.py | 4 | ||||
-rw-r--r-- | test/git/test_head.py | 4 | ||||
-rw-r--r-- | test/git/test_repo.py | 4 | ||||
-rw-r--r-- | test/git/test_stats.py | 3 | ||||
-rw-r--r-- | test/git/test_tag.py | 4 | ||||
-rw-r--r-- | test/git/test_tree.py | 4 | ||||
-rw-r--r-- | test/git/test_utils.py | 3 | ||||
-rw-r--r-- | test/helper.py | 10 | ||||
-rw-r--r-- | test/testlib/__init__.py | 7 | ||||
-rw-r--r-- | test/testlib/asserts.py (renamed from test/asserts.py) | 0 | ||||
-rw-r--r-- | test/testlib/helper.py | 10 |
16 files changed, 41 insertions, 50 deletions
diff --git a/lib/git_python/__init__.py b/lib/git_python/__init__.py index 404cea12..71142a40 100644 --- a/lib/git_python/__init__.py +++ b/lib/git_python/__init__.py @@ -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)) ] diff --git a/test/git/test_actor.py b/test/git/test_actor.py index 2fc7781f..14b78f19 100644 --- a/test/git/test_actor.py +++ b/test/git/test_actor.py @@ -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): diff --git a/test/git/test_blob.py b/test/git/test_blob.py index f41429a6..1d84e1d8 100644 --- a/test/git/test_blob.py +++ b/test/git/test_blob.py @@ -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): diff --git a/test/git/test_commit.py b/test/git/test_commit.py index 825eba5a..65e92812 100644 --- a/test/git/test_commit.py +++ b/test/git/test_commit.py @@ -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): diff --git a/test/git/test_diff.py b/test/git/test_diff.py index c9352a18..b605eddd 100644 --- a/test/git/test_diff.py +++ b/test/git/test_diff.py @@ -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): diff --git a/test/git/test_git.py b/test/git/test_git.py index 973f242a..0634a5dd 100644 --- a/test/git/test_git.py +++ b/test/git/test_git.py @@ -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): diff --git a/test/git/test_head.py b/test/git/test_head.py index fff3c0a0..47cfb608 100644 --- a/test/git/test_head.py +++ b/test/git/test_head.py @@ -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): diff --git a/test/git/test_repo.py b/test/git/test_repo.py index 09238c66..af567811 100644 --- a/test/git/test_repo.py +++ b/test/git/test_repo.py @@ -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): diff --git a/test/git/test_stats.py b/test/git/test_stats.py index 36e35e40..4926ac4f 100644 --- a/test/git/test_stats.py +++ b/test/git/test_stats.py @@ -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): diff --git a/test/git/test_tag.py b/test/git/test_tag.py index 14a0990d..fb9613c8 100644 --- a/test/git/test_tag.py +++ b/test/git/test_tag.py @@ -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): diff --git a/test/git/test_tree.py b/test/git/test_tree.py index 3739a704..5d8dea67 100644 --- a/test/git/test_tree.py +++ b/test/git/test_tree.py @@ -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): diff --git a/test/git/test_utils.py b/test/git/test_utils.py index e3b23b2a..a9af2040 100644 --- a/test/git/test_utils.py +++ b/test/git/test_utils.py @@ -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 index 082e57e5..00000000 --- a/test/helper.py +++ /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 index 00000000..3662435d --- /dev/null +++ b/test/testlib/__init__.py @@ -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)) ] diff --git a/test/asserts.py b/test/testlib/asserts.py index 33dd843b..33dd843b 100644 --- a/test/asserts.py +++ b/test/testlib/asserts.py diff --git a/test/testlib/helper.py b/test/testlib/helper.py new file mode 100644 index 00000000..19cff8f5 --- /dev/null +++ b/test/testlib/helper.py @@ -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 |