Use Python 3 string literals for the unit tests
Now unit tests are broken.
This commit is contained in:
parent
aaa3d533a8
commit
7950ee1116
@ -27,13 +27,15 @@
|
|||||||
|
|
||||||
"""Tests for Blob objects."""
|
"""Tests for Blob objects."""
|
||||||
|
|
||||||
__author__ = 'dborowitz@google.com (Dave Borowitz)'
|
from __future__ import unicode_literals
|
||||||
|
|
||||||
import unittest
|
import unittest
|
||||||
|
|
||||||
import pygit2
|
import pygit2
|
||||||
import utils
|
import utils
|
||||||
|
|
||||||
|
|
||||||
|
__author__ = 'dborowitz@google.com (Dave Borowitz)'
|
||||||
|
|
||||||
BLOB_SHA = 'af431f20fc541ed6d5afede3e2dc7160f6f01f16'
|
BLOB_SHA = 'af431f20fc541ed6d5afede3e2dc7160f6f01f16'
|
||||||
|
|
||||||
|
|
||||||
|
@ -27,13 +27,15 @@
|
|||||||
|
|
||||||
"""Tests for Commit objects."""
|
"""Tests for Commit objects."""
|
||||||
|
|
||||||
__author__ = 'dborowitz@google.com (Dave Borowitz)'
|
from __future__ import unicode_literals
|
||||||
|
|
||||||
import unittest
|
import unittest
|
||||||
|
|
||||||
from pygit2 import GIT_OBJ_COMMIT
|
from pygit2 import GIT_OBJ_COMMIT
|
||||||
import utils
|
import utils
|
||||||
|
|
||||||
|
|
||||||
|
__author__ = 'dborowitz@google.com (Dave Borowitz)'
|
||||||
|
|
||||||
COMMIT_SHA = '5fe808e8953c12735680c257f56600cb0de44b10'
|
COMMIT_SHA = '5fe808e8953c12735680c257f56600cb0de44b10'
|
||||||
|
|
||||||
|
|
||||||
|
@ -28,14 +28,16 @@
|
|||||||
|
|
||||||
"""Tests for Index files."""
|
"""Tests for Index files."""
|
||||||
|
|
||||||
__author__ = 'jdavid@itaapy.com (J. David Ibáñez)'
|
from __future__ import unicode_literals
|
||||||
|
|
||||||
import unittest
|
|
||||||
import os
|
import os
|
||||||
|
import unittest
|
||||||
import utils
|
|
||||||
|
|
||||||
import pygit2
|
import pygit2
|
||||||
|
import utils
|
||||||
|
|
||||||
|
|
||||||
|
__author__ = 'jdavid@itaapy.com (J. David Ibáñez)'
|
||||||
|
|
||||||
|
|
||||||
class IndexBareTest(utils.BareRepoTestCase):
|
class IndexBareTest(utils.BareRepoTestCase):
|
||||||
|
|
||||||
|
@ -28,15 +28,15 @@
|
|||||||
|
|
||||||
"""Tests for reference objects."""
|
"""Tests for reference objects."""
|
||||||
|
|
||||||
|
from __future__ import unicode_literals
|
||||||
|
import unittest
|
||||||
|
|
||||||
|
from pygit2 import GIT_REF_OID, GIT_REF_SYMBOLIC
|
||||||
|
import utils
|
||||||
|
|
||||||
|
|
||||||
__author__ = 'david.versmisse@itaapy.com (David Versmisse)'
|
__author__ = 'david.versmisse@itaapy.com (David Versmisse)'
|
||||||
|
|
||||||
import unittest
|
|
||||||
import utils
|
|
||||||
from pygit2 import GIT_REF_OID, GIT_REF_SYMBOLIC
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
LAST_COMMIT = '2be5719152d4f82c7302b1c0932d8e5f0a4a0e98'
|
LAST_COMMIT = '2be5719152d4f82c7302b1c0932d8e5f0a4a0e98'
|
||||||
|
|
||||||
|
|
||||||
|
@ -27,8 +27,7 @@
|
|||||||
|
|
||||||
"""Tests for Repository objects."""
|
"""Tests for Repository objects."""
|
||||||
|
|
||||||
__author__ = 'dborowitz@google.com (Dave Borowitz)'
|
from __future__ import unicode_literals
|
||||||
|
|
||||||
import binascii
|
import binascii
|
||||||
import unittest
|
import unittest
|
||||||
import os
|
import os
|
||||||
@ -38,6 +37,9 @@ from pygit2 import (GitError, GIT_OBJ_ANY, GIT_OBJ_BLOB, GIT_OBJ_COMMIT,
|
|||||||
init_repository)
|
init_repository)
|
||||||
import utils
|
import utils
|
||||||
|
|
||||||
|
|
||||||
|
__author__ = 'dborowitz@google.com (Dave Borowitz)'
|
||||||
|
|
||||||
A_HEX_SHA = 'af431f20fc541ed6d5afede3e2dc7160f6f01f16'
|
A_HEX_SHA = 'af431f20fc541ed6d5afede3e2dc7160f6f01f16'
|
||||||
A_BIN_SHA = binascii.unhexlify(A_HEX_SHA)
|
A_BIN_SHA = binascii.unhexlify(A_HEX_SHA)
|
||||||
|
|
||||||
|
@ -28,13 +28,16 @@
|
|||||||
|
|
||||||
"""Tests for revision walk."""
|
"""Tests for revision walk."""
|
||||||
|
|
||||||
__author__ = 'jdavid@itaapy.com (J. David Ibáñez)'
|
from __future__ import unicode_literals
|
||||||
|
|
||||||
import unittest
|
import unittest
|
||||||
|
|
||||||
from pygit2 import GIT_SORT_TIME, GIT_SORT_REVERSE
|
from pygit2 import GIT_SORT_TIME, GIT_SORT_REVERSE
|
||||||
import utils
|
import utils
|
||||||
|
|
||||||
|
|
||||||
|
__author__ = 'jdavid@itaapy.com (J. David Ibáñez)'
|
||||||
|
|
||||||
|
|
||||||
# In the order given by git log
|
# In the order given by git log
|
||||||
log = [
|
log = [
|
||||||
'2be5719152d4f82c7302b1c0932d8e5f0a4a0e98',
|
'2be5719152d4f82c7302b1c0932d8e5f0a4a0e98',
|
||||||
|
@ -28,13 +28,15 @@
|
|||||||
|
|
||||||
"""Tests for revision walk."""
|
"""Tests for revision walk."""
|
||||||
|
|
||||||
__author__ = 'mike.perdide@gmail.com (Julien Miotte)'
|
from __future__ import unicode_literals
|
||||||
|
|
||||||
import unittest
|
import unittest
|
||||||
|
|
||||||
import pygit2
|
import pygit2
|
||||||
import utils
|
import utils
|
||||||
|
|
||||||
|
|
||||||
|
__author__ = 'mike.perdide@gmail.com (Julien Miotte)'
|
||||||
|
|
||||||
EXPECTED = {
|
EXPECTED = {
|
||||||
"current_file": pygit2.GIT_STATUS_CURRENT,
|
"current_file": pygit2.GIT_STATUS_CURRENT,
|
||||||
"file_deleted": pygit2.GIT_STATUS_WT_DELETED,
|
"file_deleted": pygit2.GIT_STATUS_WT_DELETED,
|
||||||
|
@ -27,13 +27,15 @@
|
|||||||
|
|
||||||
"""Tests for Tag objects."""
|
"""Tests for Tag objects."""
|
||||||
|
|
||||||
__author__ = 'dborowitz@google.com (Dave Borowitz)'
|
from __future__ import unicode_literals
|
||||||
|
|
||||||
import unittest
|
import unittest
|
||||||
|
|
||||||
import pygit2
|
import pygit2
|
||||||
import utils
|
import utils
|
||||||
|
|
||||||
|
|
||||||
|
__author__ = 'dborowitz@google.com (Dave Borowitz)'
|
||||||
|
|
||||||
TAG_SHA = '3d2962987c695a29f1f80b6c3aa4ec046ef44369'
|
TAG_SHA = '3d2962987c695a29f1f80b6c3aa4ec046ef44369'
|
||||||
|
|
||||||
|
|
||||||
|
@ -27,14 +27,16 @@
|
|||||||
|
|
||||||
"""Tests for Commit objects."""
|
"""Tests for Commit objects."""
|
||||||
|
|
||||||
__author__ = 'dborowitz@google.com (Dave Borowitz)'
|
from __future__ import unicode_literals
|
||||||
|
|
||||||
import operator
|
import operator
|
||||||
import unittest
|
import unittest
|
||||||
|
|
||||||
import pygit2
|
import pygit2
|
||||||
import utils
|
import utils
|
||||||
|
|
||||||
|
|
||||||
|
__author__ = 'dborowitz@google.com (Dave Borowitz)'
|
||||||
|
|
||||||
TREE_SHA = '967fce8df97cc71722d3c2a5930ef3e6f1d27b12'
|
TREE_SHA = '967fce8df97cc71722d3c2a5930ef3e6f1d27b12'
|
||||||
SUBTREE_SHA = '614fd9a3094bf618ea938fffc00e7d1a54f89ad0'
|
SUBTREE_SHA = '614fd9a3094bf618ea938fffc00e7d1a54f89ad0'
|
||||||
|
|
||||||
|
@ -25,8 +25,6 @@
|
|||||||
|
|
||||||
"""Test utilities for libgit2."""
|
"""Test utilities for libgit2."""
|
||||||
|
|
||||||
__author__ = 'dborowitz@google.com (Dave Borowitz)'
|
|
||||||
|
|
||||||
import os
|
import os
|
||||||
import shutil
|
import shutil
|
||||||
import tarfile
|
import tarfile
|
||||||
@ -36,6 +34,9 @@ import unittest
|
|||||||
import pygit2
|
import pygit2
|
||||||
|
|
||||||
|
|
||||||
|
__author__ = 'dborowitz@google.com (Dave Borowitz)'
|
||||||
|
|
||||||
|
|
||||||
class BaseTestCase(unittest.TestCase):
|
class BaseTestCase(unittest.TestCase):
|
||||||
|
|
||||||
def tearDown(self):
|
def tearDown(self):
|
||||||
|
Loading…
x
Reference in New Issue
Block a user