diff options
author | Sebastian Thiel <byronimo@gmail.com> | 2014-11-15 16:19:24 +0100 |
---|---|---|
committer | Sebastian Thiel <byronimo@gmail.com> | 2014-11-15 16:21:37 +0100 |
commit | ff13922f6cfb11128b7651ddfcbbd5cad67e477f (patch) | |
tree | 9d999b14a7817b1ceeb23ddd1cded446ace9255c /git/test | |
parent | 9c39afa1f85f3293ad2ccef684ff62bf0a36e73c (diff) | |
parent | f7ed51ba4c8416888f5744ddb84726316c461051 (diff) | |
download | gitpython-ff13922f6cfb11128b7651ddfcbbd5cad67e477f.tar.gz |
Merge branch 'sf-master' of https://github.com/johnsca/GitPython into johnsca-sf-master
Conflicts:
git/cmd.py
git/objects/commit.py
git/objects/fun.py
git/objects/util.py
git/remote.py
git/repo/base.py
git/test/lib/helper.py
git/test/test_commit.py
git/test/test_fun.py
git/util.py
Diffstat (limited to 'git/test')
-rw-r--r-- | git/test/lib/helper.py | 2 | ||||
-rw-r--r-- | git/test/test_fun.py | 7 | ||||
-rw-r--r-- | git/test/test_git.py | 4 |
3 files changed, 9 insertions, 4 deletions
diff --git a/git/test/lib/helper.py b/git/test/lib/helper.py index 2634ecdb..a76f1a15 100644 --- a/git/test/lib/helper.py +++ b/git/test/lib/helper.py @@ -227,7 +227,7 @@ class TestBase(TestCase): """ @classmethod - def setUp(cls): + def setUpClass(cls): """ Dynamically add a read-only repository to our actual type. This way each test type has its own repository diff --git a/git/test/test_fun.py b/git/test/test_fun.py index 530988ef..096cd368 100644 --- a/git/test/test_fun.py +++ b/git/test/test_fun.py @@ -2,7 +2,8 @@ from git.test.lib import * from git.objects.fun import ( traverse_tree_recursive, traverse_trees_recursive, - tree_to_stream + tree_to_stream, + tree_entries_from_data ) from git.index.fun import ( @@ -249,3 +250,7 @@ class TestFun(TestBase): entries = traverse_tree_recursive(odb, commit.tree.binsha, '') assert entries # END for each commit + + def test_tree_entries_from_data(self): + r = tree_entries_from_data(b'100644 \x9f\0aaa') + assert r == [('aaa', 33188, '\x9f')], r diff --git a/git/test/test_git.py b/git/test/test_git.py index cdea1d3e..7132aa83 100644 --- a/git/test/test_git.py +++ b/git/test/test_git.py @@ -18,8 +18,8 @@ from git import ( Git, class TestGit(TestBase): @classmethod - def setUp(cls): - super(TestGit, cls).setUp() + def setUpClass(cls): + super(TestGit, cls).setUpClass() cls.git = Git(cls.rorepo.working_dir) @patch.object(Git, 'execute') |