comparison tests/conftest.py @ 493:95b77239c3b7

tests: Fix `find` tests on Windows. We need to expect OS-appropriate path separators in the output.
author Ludovic Chabant <ludovic@chabant.com>
date Thu, 23 Jul 2015 22:08:21 -0700
parents 456db44dcc53
children bab91fcef741
comparison
equal deleted inserted replaced
492:d90ccdf18156 493:95b77239c3b7
143 exit_code = _run_chef(pre_args, argv) 143 exit_code = _run_chef(pre_args, argv)
144 finally: 144 finally:
145 logging.getLogger().removeHandler(hdl) 145 logging.getLogger().removeHandler(hdl)
146 146
147 assert expected_code == exit_code 147 assert expected_code == exit_code
148 assert expected_out == memstream.getvalue() 148
149 actual_out = memstream.getvalue()
150 if self.spec.get('replace_out_path_sep'):
151 expected_out = expected_out.replace('/', os.sep)
152 assert expected_out == actual_out
149 153
150 def reportinfo(self): 154 def reportinfo(self):
151 return self.fspath, 0, "bake: %s" % self.name 155 return self.fspath, 0, "bake: %s" % self.name
152 156
153 def repr_failure(self, excinfo): 157 def repr_failure(self, excinfo):