Mercurial > piecrust2
comparison tests/conftest.py @ 439:c0700c6d9545
tests: Fix crash in processing tests.
author | Ludovic Chabant <ludovic@chabant.com> |
---|---|
date | Sat, 27 Jun 2015 22:28:32 -0700 |
parents | 2aa879d63133 |
children | 456db44dcc53 |
comparison
equal
deleted
inserted
replaced
438:cff70eeb1cc1 | 439:c0700c6d9545 |
---|---|
322 elif isinstance(subspec, dict): | 322 elif isinstance(subspec, dict): |
323 _add_mock_files(fs, path, subspec) | 323 _add_mock_files(fs, path, subspec) |
324 | 324 |
325 | 325 |
326 class CompareContext(object): | 326 class CompareContext(object): |
327 def __init__(self, path=None): | 327 def __init__(self, path=None, t=None): |
328 self.path = path or '' | 328 self.path = path or '' |
329 self.time = time.time() | 329 self.time = t or time.time() |
330 | 330 |
331 def createChildContext(self, name): | 331 def createChildContext(self, name): |
332 ctx = CompareContext( | 332 ctx = CompareContext( |
333 path='%s/%s' % (self.path, name), | 333 path='%s/%s' % (self.path, name), |
334 time=self.time) | 334 t=self.time) |
335 return ctx | 335 return ctx |
336 | 336 |
337 | 337 |
338 def _compare(left, right, ctx): | 338 def _compare(left, right, ctx): |
339 if type(left) != type(right): | 339 if type(left) != type(right): |