diff options
author | Sebastian Thiel <byronimo@gmail.com> | 2015-01-05 10:09:51 +0100 |
---|---|---|
committer | Sebastian Thiel <byronimo@gmail.com> | 2015-01-05 10:09:51 +0100 |
commit | bc8c91200a7fb2140aadd283c66b5ab82f9ad61e (patch) | |
tree | 54f8b4e09ae36f465da25ecd16d6377a2a8414a8 /git/test/test_repo.py | |
parent | ae2ff0f9d704dc776a1934f72a339da206a9fff4 (diff) | |
download | gitpython-py3.tar.gz |
Fixed io types to make tests work on PY2 once again.py3
Now it's about going through PY3 issues
Diffstat (limited to 'git/test/test_repo.py')
-rw-r--r-- | git/test/test_repo.py | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/git/test/test_repo.py b/git/test/test_repo.py index f33fe467..ae824086 100644 --- a/git/test/test_repo.py +++ b/git/test/test_repo.py @@ -36,7 +36,7 @@ import os import sys import tempfile import shutil -from io import StringIO +from io import BytesIO class TestRepo(TestBase): @@ -362,22 +362,22 @@ class TestRepo(TestBase): def test_git_cmd(self): # test CatFileContentStream, just to be very sure we have no fencepost errors # last \n is the terminating newline that it expects - l1 = "0123456789\n" - l2 = "abcdefghijklmnopqrstxy\n" - l3 = "z\n" - d = "%s%s%s\n" % (l1, l2, l3) + l1 = b"0123456789\n" + l2 = b"abcdefghijklmnopqrstxy\n" + l3 = b"z\n" + d = b"%s%s%s\n" % (l1, l2, l3) l1p = l1[:5] # full size # size is without terminating newline def mkfull(): - return Git.CatFileContentStream(len(d) - 1, StringIO(d)) + return Git.CatFileContentStream(len(d) - 1, BytesIO(d)) ts = 5 def mktiny(): - return Git.CatFileContentStream(ts, StringIO(d)) + return Git.CatFileContentStream(ts, BytesIO(d)) # readlines no limit s = mkfull() |