diff tests/basefs.py @ 491:152a15046b41

tests: Normalize test paths using the correct method.
author Ludovic Chabant <ludovic@chabant.com>
date Wed, 22 Jul 2015 22:21:42 -0700
parents e7b865f8f335
children f987b29d6fab
line wrap: on
line diff
--- a/tests/basefs.py	Wed Jul 22 22:20:35 2015 -0700
+++ b/tests/basefs.py	Wed Jul 22 22:21:42 2015 -0700
@@ -33,16 +33,12 @@
         return PieCrust(root_dir, cache=cache, debug=True)
 
     def withDir(self, path):
-        path = path.replace('\\', '/')
-        path = path.lstrip('/')
-        path = '/%s/%s' % (self._root, path)
+        path = self.path(path)
         self._createDir(path)
         return self
 
     def withFile(self, path, contents):
-        path = path.replace('\\', '/')
-        path = path.lstrip('/')
-        path = '/%s/%s' % (self._root, path)
+        path = self.path(path)
         self._createFile(path, contents)
         return self