diff options
author | Sebastian Thiel <byronimo@gmail.com> | 2010-11-21 21:47:18 +0100 |
---|---|---|
committer | Sebastian Thiel <byronimo@gmail.com> | 2010-11-21 22:00:45 +0100 |
commit | 48a17c87c15b2fa7ce2e84afa09484f354d57a39 (patch) | |
tree | 8664414605c3b8f5176c144c18e5f4b9d0715852 /test | |
parent | 0b813371f5a8af95152cae109d28c7c97bfaf79f (diff) | |
parent | 6befb28efd86556e45bb0b213bcfbfa866cac379 (diff) | |
download | gitpython-48a17c87c15b2fa7ce2e84afa09484f354d57a39.tar.gz |
-#######->WARNING<-####### Directory structure changed, see commit message
If you use git-python as a submodule of your own project, which alters the sys.path to import it,
you will have to adjust your code to take the changed directory structure into consideration.
Previously, you would put the path
./git-python/lib
into your syspath. All modules moved two levels up, which means that the 'git-python' directory
now is a package itself. This implies that the submodule's path must change so that the root
directory is called 'git'.
Your code must now put the directory containing the submodule into the sys.path.
For example, if you previously would have the following configuration:
./ext/git-python/lib/git/__init__.py
you would now change your submodule path to the following:
./ext/git
On the latets revision, the directory structure is changed so that
the git/__init__.py file is at the following path:
./ext/git/__init__.py
To be able to import git, you need to put ./ext into your sys.path.
Diffstat (limited to 'test')
-rw-r--r-- | test/git/__init__.py | 5 | ||||
-rw-r--r-- | test/lib/__init__.py (renamed from test/testlib/__init__.py) | 0 | ||||
-rw-r--r-- | test/lib/asserts.py (renamed from test/testlib/asserts.py) | 0 | ||||
-rw-r--r-- | test/lib/helper.py (renamed from test/testlib/helper.py) | 0 | ||||
-rw-r--r-- | test/performance/lib.py (renamed from test/git/performance/lib.py) | 2 | ||||
-rw-r--r-- | test/performance/test_commit.py (renamed from test/git/performance/test_commit.py) | 2 | ||||
-rw-r--r-- | test/performance/test_odb.py (renamed from test/git/performance/test_odb.py) | 0 | ||||
-rw-r--r-- | test/performance/test_streams.py (renamed from test/git/performance/test_streams.py) | 2 | ||||
-rw-r--r-- | test/performance/test_utils.py (renamed from test/git/performance/test_utils.py) | 0 | ||||
-rw-r--r-- | test/test_actor.py (renamed from test/git/test_actor.py) | 2 | ||||
-rw-r--r-- | test/test_base.py (renamed from test/git/test_base.py) | 2 | ||||
-rw-r--r-- | test/test_blob.py (renamed from test/git/test_blob.py) | 2 | ||||
-rw-r--r-- | test/test_commit.py (renamed from test/git/test_commit.py) | 2 | ||||
-rw-r--r-- | test/test_config.py (renamed from test/git/test_config.py) | 2 | ||||
-rw-r--r-- | test/test_db.py (renamed from test/git/test_db.py) | 2 | ||||
-rw-r--r-- | test/test_diff.py (renamed from test/git/test_diff.py) | 2 | ||||
-rw-r--r-- | test/test_fun.py (renamed from test/git/test_fun.py) | 2 | ||||
-rw-r--r-- | test/test_git.py (renamed from test/git/test_git.py) | 2 | ||||
-rw-r--r-- | test/test_index.py (renamed from test/git/test_index.py) | 2 | ||||
-rw-r--r-- | test/test_refs.py (renamed from test/git/test_refs.py) | 2 | ||||
-rw-r--r-- | test/test_remote.py (renamed from test/git/test_remote.py) | 2 | ||||
-rw-r--r-- | test/test_repo.py (renamed from test/git/test_repo.py) | 2 | ||||
-rw-r--r-- | test/test_stats.py (renamed from test/git/test_stats.py) | 2 | ||||
-rw-r--r-- | test/test_submodule.py (renamed from test/git/test_submodule.py) | 10 | ||||
-rw-r--r-- | test/test_tree.py (renamed from test/git/test_tree.py) | 2 | ||||
-rw-r--r-- | test/test_util.py (renamed from test/git/test_util.py) | 2 |
26 files changed, 22 insertions, 31 deletions
diff --git a/test/git/__init__.py b/test/git/__init__.py deleted file mode 100644 index 757cbad1..00000000 --- a/test/git/__init__.py +++ /dev/null @@ -1,5 +0,0 @@ -# __init__.py -# Copyright (C) 2008, 2009 Michael Trier (mtrier@gmail.com) and contributors -# -# This module is part of GitPython and is released under -# the BSD License: http://www.opensource.org/licenses/bsd-license.php diff --git a/test/testlib/__init__.py b/test/lib/__init__.py index 77512794..77512794 100644 --- a/test/testlib/__init__.py +++ b/test/lib/__init__.py diff --git a/test/testlib/asserts.py b/test/lib/asserts.py index fa754b92..fa754b92 100644 --- a/test/testlib/asserts.py +++ b/test/lib/asserts.py diff --git a/test/testlib/helper.py b/test/lib/helper.py index 4e7b5cf6..4e7b5cf6 100644 --- a/test/testlib/helper.py +++ b/test/lib/helper.py diff --git a/test/git/performance/lib.py b/test/performance/lib.py index 4ac1f1da..d0727b60 100644 --- a/test/git/performance/lib.py +++ b/test/performance/lib.py @@ -1,6 +1,6 @@ """Contains library functions""" import os -from test.testlib import * +from git.test.lib import * import shutil import tempfile diff --git a/test/git/performance/test_commit.py b/test/performance/test_commit.py index 62d409fc..80421aa2 100644 --- a/test/git/performance/test_commit.py +++ b/test/performance/test_commit.py @@ -7,7 +7,7 @@ from lib import * from git import * from gitdb import IStream -from test.git.test_commit import assert_commit_serialization +from git.test.test_commit import assert_commit_serialization from cStringIO import StringIO from time import time import sys diff --git a/test/git/performance/test_odb.py b/test/performance/test_odb.py index 32b70f69..32b70f69 100644 --- a/test/git/performance/test_odb.py +++ b/test/performance/test_odb.py diff --git a/test/git/performance/test_streams.py b/test/performance/test_streams.py index a5811262..7f17d722 100644 --- a/test/git/performance/test_streams.py +++ b/test/performance/test_streams.py @@ -1,6 +1,6 @@ """Performance data streaming performance""" -from test.testlib import * +from git.test.lib import * from gitdb import * from gitdb.util import bin_to_hex diff --git a/test/git/performance/test_utils.py b/test/performance/test_utils.py index 19c1e84a..19c1e84a 100644 --- a/test/git/performance/test_utils.py +++ b/test/performance/test_utils.py diff --git a/test/git/test_actor.py b/test/test_actor.py index 8fda57e5..b8e5ba3b 100644 --- a/test/git/test_actor.py +++ b/test/test_actor.py @@ -5,7 +5,7 @@ # the BSD License: http://www.opensource.org/licenses/bsd-license.php import os -from test.testlib import * +from git.test.lib import * from git import * class TestActor(object): diff --git a/test/git/test_base.py b/test/test_base.py index 25d1e4e9..e630d151 100644 --- a/test/git/test_base.py +++ b/test/test_base.py @@ -8,7 +8,7 @@ import git.objects.base as base import git.refs as refs import os -from test.testlib import * +from git.test.lib import * from git import * from itertools import chain from git.objects.util import get_object_type_by_name diff --git a/test/git/test_blob.py b/test/test_blob.py index 623ed179..8513328e 100644 --- a/test/git/test_blob.py +++ b/test/test_blob.py @@ -4,7 +4,7 @@ # This module is part of GitPython and is released under # the BSD License: http://www.opensource.org/licenses/bsd-license.php -from test.testlib import * +from git.test.lib import * from git import * from gitdb.util import hex_to_bin diff --git a/test/git/test_commit.py b/test/test_commit.py index c3ce5c92..a00a8de8 100644 --- a/test/git/test_commit.py +++ b/test/test_commit.py @@ -5,7 +5,7 @@ # This module is part of GitPython and is released under # the BSD License: http://www.opensource.org/licenses/bsd-license.php -from test.testlib import * +from git.test.lib import * from git import * from gitdb import IStream from gitdb.util import hex_to_bin diff --git a/test/git/test_config.py b/test/test_config.py index 8c846b99..173e380c 100644 --- a/test/git/test_config.py +++ b/test/test_config.py @@ -4,7 +4,7 @@ # This module is part of GitPython and is released under # the BSD License: http://www.opensource.org/licenses/bsd-license.php -from test.testlib import * +from git.test.lib import * from git import * import StringIO from copy import copy diff --git a/test/git/test_db.py b/test/test_db.py index 9da13bd8..db2d7983 100644 --- a/test/git/test_db.py +++ b/test/test_db.py @@ -3,7 +3,7 @@ # # This module is part of GitPython and is released under # the BSD License: http://www.opensource.org/licenses/bsd-license.php -from test.testlib import * +from git.test.lib import * from git.db import * from gitdb.util import bin_to_hex from git.exc import BadObject diff --git a/test/git/test_diff.py b/test/test_diff.py index ade21c1b..83db2df6 100644 --- a/test/git/test_diff.py +++ b/test/test_diff.py @@ -4,7 +4,7 @@ # This module is part of GitPython and is released under # the BSD License: http://www.opensource.org/licenses/bsd-license.php -from test.testlib import * +from git.test.lib import * from git import * class TestDiff(TestBase): diff --git a/test/git/test_fun.py b/test/test_fun.py index 3fdc13fd..b7991cdb 100644 --- a/test/git/test_fun.py +++ b/test/test_fun.py @@ -1,4 +1,4 @@ -from test.testlib import * +from git.test.lib import * from git.objects.fun import ( traverse_tree_recursive, traverse_trees_recursive, diff --git a/test/git/test_git.py b/test/test_git.py index 518c464a..c92a642b 100644 --- a/test/git/test_git.py +++ b/test/test_git.py @@ -5,7 +5,7 @@ # the BSD License: http://www.opensource.org/licenses/bsd-license.php import os, sys -from test.testlib import * +from git.test.lib import * from git import Git, GitCommandError class TestGit(TestCase): diff --git a/test/git/test_index.py b/test/test_index.py index 29a7404d..78a868c7 100644 --- a/test/git/test_index.py +++ b/test/test_index.py @@ -4,7 +4,7 @@ # This module is part of GitPython and is released under # the BSD License: http://www.opensource.org/licenses/bsd-license.php -from test.testlib import * +from git.test.lib import * from git import * import inspect import os diff --git a/test/git/test_refs.py b/test/test_refs.py index fa26bae9..700e5fac 100644 --- a/test/git/test_refs.py +++ b/test/test_refs.py @@ -5,7 +5,7 @@ # the BSD License: http://www.opensource.org/licenses/bsd-license.php from mock import * -from test.testlib import * +from git.test.lib import * from git import * import git.refs as refs from git.objects.tag import TagObject diff --git a/test/git/test_remote.py b/test/test_remote.py index c52f907e..108712a5 100644 --- a/test/git/test_remote.py +++ b/test/test_remote.py @@ -4,7 +4,7 @@ # This module is part of GitPython and is released under # the BSD License: http://www.opensource.org/licenses/bsd-license.php -from test.testlib import * +from git.test.lib import * from git import * from git.util import IterableList import tempfile diff --git a/test/git/test_repo.py b/test/test_repo.py index 62b4c476..59a1f6bf 100644 --- a/test/git/test_repo.py +++ b/test/test_repo.py @@ -3,7 +3,7 @@ # # This module is part of GitPython and is released under # the BSD License: http://www.opensource.org/licenses/bsd-license.php -from test.testlib import * +from git.test.lib import * from git import * from git.util import join_path_native from git.exc import BadObject diff --git a/test/git/test_stats.py b/test/test_stats.py index cc30bf92..2bdb0a89 100644 --- a/test/git/test_stats.py +++ b/test/test_stats.py @@ -4,7 +4,7 @@ # This module is part of GitPython and is released under # the BSD License: http://www.opensource.org/licenses/bsd-license.php -from test.testlib import * +from git.test.lib import * from git import * class TestStats(TestBase): diff --git a/test/git/test_submodule.py b/test/test_submodule.py index d922f32a..c1fa2061 100644 --- a/test/git/test_submodule.py +++ b/test/test_submodule.py @@ -1,7 +1,7 @@ # This module is part of GitPython and is released under # the BSD License: http://www.opensource.org/licenses/bsd-license.php -from test.testlib import * +from git.test.lib import * from git.exc import * from git.objects.submodule.base import Submodule from git.objects.submodule.root import RootModule @@ -12,7 +12,7 @@ import os class TestSubmodule(TestBase): - k_subm_current = "45c0f285a6d9d9214f8167742d12af2855f527fb" + k_subm_current = "83a9e4a0dad595188ff3fb35bc3dfc4d931eff6d" k_subm_changed = "394ed7006ee5dc8bddfd132b64001d5dfc0ffdd3" k_no_subm_tag = "0.1.6" @@ -32,7 +32,7 @@ class TestSubmodule(TestBase): # at a different time, there is None assert len(Submodule.list_items(rwrepo, self.k_no_subm_tag)) == 0 - assert sm.path == 'lib/git/ext/gitdb' + assert sm.path == 'ext/gitdb' assert sm.path != sm.name # in our case, we have ids there, which don't equal the path assert sm.url == 'git://gitorious.org/git-python/gitdb.git' assert sm.branch_path == 'refs/heads/master' # the default ... @@ -298,10 +298,6 @@ class TestSubmodule(TestBase): assert nsm.path == nmp assert rwrepo.submodules[0].path == nmp - # move it back - but there is a file now - this doesn't work - # as the empty directories where removed. - self.failUnlessRaises(IOError, open, abspmp, 'w') - mpath = 'newsubmodule' absmpath = join_path_native(rwrepo.working_tree_dir, mpath) open(absmpath, 'w').write('') diff --git a/test/git/test_tree.py b/test/test_tree.py index 18688424..80db2e4b 100644 --- a/test/git/test_tree.py +++ b/test/test_tree.py @@ -5,7 +5,7 @@ # the BSD License: http://www.opensource.org/licenses/bsd-license.php import os -from test.testlib import * +from git.test.lib import * from git import * from git.objects.fun import ( traverse_tree_recursive, diff --git a/test/git/test_util.py b/test/test_util.py index 6453bc19..7a6eb27d 100644 --- a/test/git/test_util.py +++ b/test/test_util.py @@ -7,7 +7,7 @@ import os import tempfile -from test.testlib import * +from git.test.lib import * from git.util import * from git.objects.util import * from git import * |