Mercurial > piecrust2
diff tests/test_sources_base.py @ 286:a2d283d1033d
tests: Fixes for running on Windows.
Mostly about those damn backslashes, as usual.
author | Ludovic Chabant <ludovic@chabant.com> |
---|---|
date | Wed, 04 Mar 2015 22:40:50 -0800 |
parents | f130365568ff |
children | dd25bd3ce1f9 |
line wrap: on
line diff
--- a/tests/test_sources_base.py Mon Mar 02 22:42:16 2015 -0800 +++ b/tests/test_sources_base.py Wed Mar 04 22:40:50 2015 -0800 @@ -3,6 +3,7 @@ from piecrust.app import PieCrust from piecrust.sources.pageref import PageRef, PageNotFoundError from .mockutil import mock_fs, mock_fs_scope +from .pathutil import slashfix @pytest.mark.parametrize('fs, expected_paths, expected_slugs', [ @@ -108,15 +109,16 @@ app = fs.getApp() r = PageRef(app, page_ref) - assert r.possible_paths == [os.path.join(fs.path('/kitchen'), p) - for p in expected_possible_paths] + assert r.possible_paths == slashfix( + [os.path.join(fs.path('/kitchen'), p) + for p in expected_possible_paths]) assert r.exists assert r.source_name == expected_source_name assert r.source == app.getSource(expected_source_name) assert r.rel_path == expected_rel_path - assert r.path == fs.path(os.path.join( - 'kitchen', expected_source_name, expected_rel_path)) + assert r.path == slashfix(fs.path(os.path.join( + 'kitchen', expected_source_name, expected_rel_path))) def test_page_ref_with_missing_source():