Mercurial > piecrust2
comparison tests/conftest.py @ 779:982de61e7da9
tests: Fix some CLI tests.
Add auto-stripping of newlines in the CLI output for tests that use the simple
YAML string value for the expected output.
Also, fix `showconfig` test to expect a root URL with a trailing slash.
author | Ludovic Chabant <ludovic@chabant.com> |
---|---|
date | Sat, 16 Jul 2016 15:04:36 +0200 |
parents | 5e91bc0e3b4d |
children | 97c1dc568810 |
comparison
equal
deleted
inserted
replaced
778:5e91bc0e3b4d | 779:982de61e7da9 |
---|---|
213 | 213 |
214 assert expected_code == exit_code | 214 assert expected_code == exit_code |
215 | 215 |
216 if expected_out is not None: | 216 if expected_out is not None: |
217 actual_out = memstream.getvalue() | 217 actual_out = memstream.getvalue() |
218 if not self.spec.get('no_strip'): | |
219 actual_out = actual_out.rstrip(' \n') | |
220 expected_out = expected_out.rstrip(' \n') | |
218 if self.spec.get('replace_out_path_sep'): | 221 if self.spec.get('replace_out_path_sep'): |
219 expected_out = expected_out.replace('/', os.sep) | 222 expected_out = expected_out.replace('/', os.sep) |
220 assert expected_out == actual_out | 223 assert expected_out == actual_out |
221 | 224 |
222 def reportinfo(self): | 225 def reportinfo(self): |