Mercurial > piecrust2
diff tests/conftest.py @ 567:a65f04ddbea2
showconfig: Don't crash when the whole config should be shown.
author | Ludovic Chabant <ludovic@chabant.com> |
---|---|
date | Tue, 13 Oct 2015 22:46:05 -0700 |
parents | b95977d97652 |
children | d8d9e0424a72 |
line wrap: on
line diff
--- a/tests/conftest.py Sat Oct 10 23:02:40 2015 -0700 +++ b/tests/conftest.py Tue Oct 13 22:46:05 2015 -0700 @@ -149,7 +149,7 @@ argv = argv.split(' ') expected_code = self.spec.get('code', 0) - expected_out = self.spec.get('out', '') + expected_out = self.spec.get('out', None) with mock_fs_scope(fs): memstream = io.StringIO() @@ -165,10 +165,11 @@ assert expected_code == exit_code - actual_out = memstream.getvalue() - if self.spec.get('replace_out_path_sep'): - expected_out = expected_out.replace('/', os.sep) - assert expected_out == actual_out + if expected_out is not None: + actual_out = memstream.getvalue() + if self.spec.get('replace_out_path_sep'): + expected_out = expected_out.replace('/', os.sep) + assert expected_out == actual_out def reportinfo(self): return self.fspath, 0, "bake: %s" % self.name