Mercurial > piecrust2
comparison tests/test_sources_autoconfig.py @ 267:f512905ae812
sources: Generate proper slugs in the `autoconfig` and `ordered` sources.
author | Ludovic Chabant <ludovic@chabant.com> |
---|---|
date | Wed, 25 Feb 2015 13:06:41 -0800 |
parents | f130365568ff |
children | a2d283d1033d |
comparison
equal
deleted
inserted
replaced
266:2f4412745db2 | 267:f512905ae812 |
---|---|
5 | 5 |
6 @pytest.mark.parametrize( | 6 @pytest.mark.parametrize( |
7 'fs, src_config, expected_paths, expected_metadata', | 7 'fs, src_config, expected_paths, expected_metadata', |
8 [ | 8 [ |
9 (mock_fs(), {}, [], []), | 9 (mock_fs(), {}, [], []), |
10 (mock_fs().withPage('test/_index.md'), | |
11 {}, | |
12 ['_index.md'], | |
13 [{'slug': '', 'config': {'foo': []}}]), | |
10 (mock_fs().withPage('test/something.md'), | 14 (mock_fs().withPage('test/something.md'), |
11 {}, | 15 {}, |
12 ['something.md'], | 16 ['something.md'], |
13 [{'slug': 'something', 'config': {'foo': []}}]), | 17 [{'slug': 'something', 'config': {'foo': []}}]), |
14 (mock_fs().withPage('test/bar/something.md'), | 18 (mock_fs().withPage('test/bar/something.md'), |
84 | 88 |
85 @pytest.mark.parametrize( | 89 @pytest.mark.parametrize( |
86 'fs, expected_paths, expected_metadata', | 90 'fs, expected_paths, expected_metadata', |
87 [ | 91 [ |
88 (mock_fs(), [], []), | 92 (mock_fs(), [], []), |
93 (mock_fs().withPage('test/_index.md'), | |
94 ['_index.md'], | |
95 [{'slug': '', | |
96 'config': {'foo': 0, 'foo_trail': [0]}}]), | |
89 (mock_fs().withPage('test/something.md'), | 97 (mock_fs().withPage('test/something.md'), |
90 ['something.md'], | 98 ['something.md'], |
91 [{'slug': 'something', | 99 [{'slug': 'something', |
92 'config': {'foo': 0, 'foo_trail': [0]}}]), | 100 'config': {'foo': 0, 'foo_trail': [0]}}]), |
93 (mock_fs().withPage('test/08_something.md'), | 101 (mock_fs().withPage('test/08_something.md'), |