Mercurial > piecrust2
comparison tests/test_sources_autoconfig.py @ 989:8adc27285d93
bake: Big pass on bake performance.
- Reduce the amount of data passed between processes.
- Make inter-process data simple objects to make it easier to test with
alternatives to pickle.
- Make sources have the basic requirement to be able to find a content item
from an item spec (path).
- Make Hoedown the default Markdown formatter.
author | Ludovic Chabant <ludovic@chabant.com> |
---|---|
date | Sun, 19 Nov 2017 14:29:17 -0800 |
parents | 45ad976712ec |
children | 2323f0788170 |
comparison
equal
deleted
inserted
replaced
988:f83ae0a5d793 | 989:8adc27285d93 |
---|---|
180 fs.withDir('kitchen/test') | 180 fs.withDir('kitchen/test') |
181 with mock_fs_scope(fs): | 181 with mock_fs_scope(fs): |
182 app = fs.getApp() | 182 app = fs.getApp() |
183 s = app.getSource('test') | 183 s = app.getSource('test') |
184 route_metadata = {'slug': route_path} | 184 route_metadata = {'slug': route_path} |
185 item = s.findContent(route_metadata) | 185 item = s.findContentFromRoute(route_metadata) |
186 if item is None: | 186 if item is None: |
187 assert expected_path is None and expected_metadata is None | 187 assert expected_path is None and expected_metadata is None |
188 else: | 188 else: |
189 assert os.path.relpath(item.spec, s.fs_endpoint_path) == \ | 189 assert os.path.relpath(item.spec, s.fs_endpoint_path) == \ |
190 slashfix(expected_path) | 190 slashfix(expected_path) |