diff tests/test_sources_autoconfig.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 f512905ae812
children dd25bd3ce1f9
line wrap: on
line diff
--- a/tests/test_sources_autoconfig.py	Mon Mar 02 22:42:16 2015 -0800
+++ b/tests/test_sources_autoconfig.py	Wed Mar 04 22:40:50 2015 -0800
@@ -1,6 +1,7 @@
 import pytest
 from piecrust.sources.base import MODE_PARSING
 from .mockutil import mock_fs, mock_fs_scope
+from .pathutil import slashfix
 
 
 @pytest.mark.parametrize(
@@ -64,7 +65,7 @@
         s = app.getSource('test')
         facs = list(s.buildPageFactories())
         paths = [f.rel_path for f in facs]
-        assert paths == expected_paths
+        assert paths == slashfix(expected_paths)
         metadata = [f.metadata for f in facs]
         assert metadata == expected_metadata
 
@@ -123,7 +124,7 @@
         s = app.getSource('test')
         facs = list(s.buildPageFactories())
         paths = [f.rel_path for f in facs]
-        assert paths == expected_paths
+        assert paths == slashfix(expected_paths)
         metadata = [f.metadata for f in facs]
         assert metadata == expected_metadata
 
@@ -173,6 +174,6 @@
         s = app.getSource('test')
         route_metadata = {'slug': route_path}
         fac_path, metadata = s.findPagePath(route_metadata, MODE_PARSING)
-        assert fac_path == expected_path
+        assert fac_path == slashfix(expected_path)
         assert metadata == expected_metadata