comparison 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
comparison
equal deleted inserted replaced
490:4a9047850657 491:152a15046b41
31 def getApp(self, cache=True): 31 def getApp(self, cache=True):
32 root_dir = self.path('/kitchen') 32 root_dir = self.path('/kitchen')
33 return PieCrust(root_dir, cache=cache, debug=True) 33 return PieCrust(root_dir, cache=cache, debug=True)
34 34
35 def withDir(self, path): 35 def withDir(self, path):
36 path = path.replace('\\', '/') 36 path = self.path(path)
37 path = path.lstrip('/')
38 path = '/%s/%s' % (self._root, path)
39 self._createDir(path) 37 self._createDir(path)
40 return self 38 return self
41 39
42 def withFile(self, path, contents): 40 def withFile(self, path, contents):
43 path = path.replace('\\', '/') 41 path = self.path(path)
44 path = path.lstrip('/')
45 path = '/%s/%s' % (self._root, path)
46 self._createFile(path, contents) 42 self._createFile(path, contents)
47 return self 43 return self
48 44
49 def withAsset(self, path, contents): 45 def withAsset(self, path, contents):
50 return self.withFile('kitchen/' + path, contents) 46 return self.withFile('kitchen/' + path, contents)