From 0210e394e0776d0b7097bf666bebd690ed0c0e4f Mon Sep 17 00:00:00 2001 From: Kostis Anagnostopoulos Date: Sat, 15 Oct 2016 13:11:16 +0200 Subject: src: import os.path as osp --- git/test/test_tree.py | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) (limited to 'git/test/test_tree.py') diff --git a/git/test/test_tree.py b/git/test/test_tree.py index f36c4337..f9259874 100644 --- a/git/test/test_tree.py +++ b/git/test/test_tree.py @@ -5,7 +5,6 @@ # the BSD License: http://www.opensource.org/licenses/bsd-license.php from io import BytesIO -import os import sys from unittest.case import skipIf @@ -13,8 +12,10 @@ from git import ( Tree, Blob ) -from git.util import HIDE_WINDOWS_KNOWN_ERRORS from git.test.lib import TestBase +from git.util import HIDE_WINDOWS_KNOWN_ERRORS + +import os.path as osp class TestTree(TestBase): @@ -90,12 +91,12 @@ class TestTree(TestBase): assert len(set(b for b in root if isinstance(b, Blob)) | set(root.blobs)) == len(root.blobs) subitem = trees[0][0] assert "/" in subitem.path - assert subitem.name == os.path.basename(subitem.path) + assert subitem.name == osp.basename(subitem.path) # assure that at some point the traversed paths have a slash in them found_slash = False for item in root.traverse(): - assert os.path.isabs(item.abspath) + assert osp.isabs(item.abspath) if '/' in item.path: found_slash = True # END check for slash -- cgit v1.2.1