|
@@ -29,10 +29,8 @@ from contextlib import contextmanager
|
|
|
from io import BytesIO
|
|
|
from itertools import permutations
|
|
|
|
|
|
-from dulwich.tests import TestCase
|
|
|
-
|
|
|
-from ..errors import ObjectFormatException
|
|
|
-from ..objects import (
|
|
|
+from dulwich.errors import ObjectFormatException
|
|
|
+from dulwich.objects import (
|
|
|
MAX_TIME,
|
|
|
Blob,
|
|
|
Commit,
|
|
@@ -54,6 +52,8 @@ from ..objects import (
|
|
|
sha_to_hex,
|
|
|
sorted_tree_items,
|
|
|
)
|
|
|
+
|
|
|
+from . import TestCase
|
|
|
from .utils import ext_functest_builder, functest_builder, make_commit, make_object
|
|
|
|
|
|
a_sha = b"6f670c0fb53f9463760b7295fbb814e965fb20c8"
|
|
@@ -75,7 +75,7 @@ class BlobReadTests(TestCase):
|
|
|
"""Test decompression of blobs."""
|
|
|
|
|
|
def get_sha_file(self, cls, base, sha):
|
|
|
- dir = os.path.join(os.path.dirname(__file__), "..", "..", "testdata", base)
|
|
|
+ dir = os.path.join(os.path.dirname(__file__), "..", "testdata", base)
|
|
|
return cls.from_path(hex_to_filename(dir, sha))
|
|
|
|
|
|
def get_blob(self, sha):
|
|
@@ -855,7 +855,7 @@ class TreeTests(ShaFileCheckTests):
|
|
|
self.assertEqual(_SORTED_TREE_ITEMS, x.items())
|
|
|
|
|
|
def _do_test_parse_tree(self, parse_tree):
|
|
|
- dir = os.path.join(os.path.dirname(__file__), "..", "..", "testdata", "trees")
|
|
|
+ dir = os.path.join(os.path.dirname(__file__), "..", "testdata", "trees")
|
|
|
o = Tree.from_path(hex_to_filename(dir, tree_sha))
|
|
|
self.assertEqual(
|
|
|
[(b"a", 0o100644, a_sha), (b"b", 0o100644, b_sha)],
|