Mercurial > piecrust2
comparison tests/test_data_linker.py @ 979:45ad976712ec
tests: Big push to get the tests to pass again.
- Lots of fixes everywhere in the code.
- Try to handle debug logging in the multiprocessing worker pool when running in pytest. Not perfect, but usable for now.
- Replace all `.md` test files with `.html` since now a auto-format extension always sets the format.
- Replace `out` with `outfiles` in most places since now blog archives are added to the bake output and I don't want to add expected outputs for blog archives everywhere.
author | Ludovic Chabant <ludovic@chabant.com> |
---|---|
date | Sun, 29 Oct 2017 22:51:57 -0700 |
parents | 72f17534d58e |
children |
comparison
equal
deleted
inserted
replaced
978:7e51d14097cb | 979:45ad976712ec |
---|---|
5 | 5 |
6 @pytest.mark.parametrize( | 6 @pytest.mark.parametrize( |
7 'fs_fac, page_path, expected', | 7 'fs_fac, page_path, expected', |
8 [ | 8 [ |
9 (lambda: mock_fs().withPage('pages/foo'), 'foo', | 9 (lambda: mock_fs().withPage('pages/foo'), 'foo', |
10 []), | 10 ['/foo']), |
11 ((lambda: mock_fs() | 11 ((lambda: mock_fs() |
12 .withPage('pages/foo') | 12 .withPage('pages/foo') |
13 .withPage('pages/bar')), | 13 .withPage('pages/bar')), |
14 'foo', | 14 'foo', |
15 ['/bar']), | 15 ['/bar', '/foo']), |
16 ((lambda: mock_fs() | 16 ((lambda: mock_fs() |
17 .withPage('pages/baz') | 17 .withPage('pages/baz') |
18 .withPage('pages/something') | 18 .withPage('pages/something') |
19 .withPage('pages/something/else') | 19 .withPage('pages/something/else') |
20 .withPage('pages/foo') | 20 .withPage('pages/foo') |
21 .withPage('pages/bar')), | 21 .withPage('pages/bar')), |
22 'foo', | 22 'foo', |
23 ['/bar', '/baz', '/something']), | 23 ['/bar', '/baz', '/foo', '/something']), |
24 ((lambda: mock_fs() | 24 ((lambda: mock_fs() |
25 .withPage('pages/something/else') | 25 .withPage('pages/something/else') |
26 .withPage('pages/foo') | 26 .withPage('pages/foo') |
27 .withPage('pages/something/good') | 27 .withPage('pages/something/good') |
28 .withPage('pages/bar')), | 28 .withPage('pages/bar')), |
29 'something/else', | 29 'something/else', |
30 ['/something/good']) | 30 ['/something/else', '/something/good']) |
31 ]) | 31 ]) |
32 def test_linker_siblings(fs_fac, page_path, expected): | 32 def test_linker_siblings(fs_fac, page_path, expected): |
33 fs = fs_fac() | 33 fs = fs_fac() |
34 fs.withConfig() | 34 fs.withConfig() |
35 with mock_fs_scope(fs): | 35 with mock_fs_scope(fs): |