diff options
Diffstat (limited to 'git/test')
| -rw-r--r-- | git/test/performance/test_commit.py | 2 | ||||
| -rw-r--r-- | git/test/test_fun.py | 18 |
2 files changed, 12 insertions, 8 deletions
diff --git a/git/test/performance/test_commit.py b/git/test/performance/test_commit.py index c60dc2fc..322d3c9f 100644 --- a/git/test/performance/test_commit.py +++ b/git/test/performance/test_commit.py @@ -52,7 +52,7 @@ class TestPerformance(TestBigRepoRW): # END for each object # END for each commit elapsed_time = time() - st - print("Traversed %i Trees and a total of %i unchached objects in %s [s] ( %f objs/s )" + print("Traversed %i Trees and a total of %i uncached objects in %s [s] ( %f objs/s )" % (nc, no, elapsed_time, no / elapsed_time), file=sys.stderr) def test_commit_traversal(self): diff --git a/git/test/test_fun.py b/git/test/test_fun.py index 3be25e3e..9d436653 100644 --- a/git/test/test_fun.py +++ b/git/test/test_fun.py @@ -1,10 +1,8 @@ from io import BytesIO -from stat import ( - S_IFDIR, - S_IFREG, - S_IFLNK -) +from stat import S_IFDIR, S_IFREG, S_IFLNK +from unittest.case import skipIf +from git.compat import PY3 from git.index import IndexFile from git.index.fun import ( aggressive_tree_merge @@ -253,6 +251,12 @@ class TestFun(TestBase): assert entries # END for each commit - def test_tree_entries_from_data_with_failing_name_decode(self): + @skipIf(PY3, 'odd types returned ... maybe figure it out one day') + def test_tree_entries_from_data_with_failing_name_decode_py2(self): + r = tree_entries_from_data(b'100644 \x9f\0aaa') + assert r == [('aaa', 33188, u'\udc9f')], r + + @skipIf(not PY3, 'odd types returned ... maybe figure it out one day') + def test_tree_entries_from_data_with_failing_name_decode_py3(self): r = tree_entries_from_data(b'100644 \x9f\0aaa') - assert r == [(b'aaa', 33188, b'\x9f')], r + assert r == [(b'aaa', 33188, '\udc9f')], r |
