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