From 4e3cef81d7a10a1b57efc1ad443dfd51b6e486cf Mon Sep 17 00:00:00 2001 From: Joe Rickerby Date: Fri, 6 Mar 2020 09:08:20 +0000 Subject: [PATCH] Fix style errors --- test/02_test/test/spam_test.py | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/test/02_test/test/spam_test.py b/test/02_test/test/spam_test.py index d26535fa..ba5f5e91 100644 --- a/test/02_test/test/spam_test.py +++ b/test/02_test/test/spam_test.py @@ -6,20 +6,20 @@ from unittest import TestCase import spam -def path_contains(parent, child): +def path_contains(parent, child): ''' returns True if `child` is inside `parent`. Works around path-comparison bugs caused by short-paths on Windows e.g. vssadm~1 instead of vssadministrator ''' - parent = os.path.abspath(parent) - child = os.path.abspath(child) + parent = os.path.abspath(parent) + child = os.path.abspath(child) - while child != os.path.dirname(child): - child = os.path.dirname(child) - if os.stat(parent) == os.stat(child): + while child != os.path.dirname(child): + child = os.path.dirname(child) + if os.stat(parent) == os.stat(child): # parent and child refer to the same directory on the filesystem - return True + return True return False