diff options
author | Sebastian Thiel <byronimo@gmail.com> | 2015-01-06 16:06:23 +0100 |
---|---|---|
committer | Sebastian Thiel <byronimo@gmail.com> | 2015-01-06 16:06:23 +0100 |
commit | c8cf69b6f8bd73525b5375bd73f1fc79ae322a82 (patch) | |
tree | c8ec70ad8846415a6df6397262794ec381a4af7b | |
parent | 1527b5734c0f2821fd6f38c1a1d70723a4bb88ab (diff) | |
download | gitpython-c8cf69b6f8bd73525b5375bd73f1fc79ae322a82.tar.gz |
Fixed test_git once again
-rw-r--r-- | git/test/test_git.py | 14 |
1 files changed, 12 insertions, 2 deletions
diff --git a/git/test/test_git.py b/git/test/test_git.py index 532e6659..502e6091 100644 --- a/git/test/test_git.py +++ b/git/test/test_git.py @@ -17,6 +17,8 @@ from git.test.lib import (TestBase, from git import (Git, GitCommandError) +from git.compat import PY3 + class TestGit(TestBase): @@ -34,11 +36,19 @@ class TestGit(TestBase): def test_call_unpack_args_unicode(self): args = Git._Git__unpack_args(u'Unicode€™') - assert_equal(args, ['Unicode\u20ac\u2122']) + if PY3: + mangled_value = 'Unicode\u20ac\u2122' + else: + mangled_value = 'Unicode\xe2\x82\xac\xe2\x84\xa2' + assert_equal(args, [mangled_value]) def test_call_unpack_args(self): args = Git._Git__unpack_args(['git', 'log', '--', u'Unicode€™']) - assert_equal(args, ['git', 'log', '--', 'Unicode\u20ac\u2122']) + if PY3: + mangled_value = 'Unicode\u20ac\u2122' + else: + mangled_value = 'Unicode\xe2\x82\xac\xe2\x84\xa2' + assert_equal(args, ['git', 'log', '--', mangled_value]) @raises(GitCommandError) def test_it_raises_errors(self): |