comparison tests/test_sources_base.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
comparison
equal deleted inserted replaced
988:f83ae0a5d793 989:8adc27285d93
64 } 64 }
65 }) 65 })
66 with mock_fs_scope(fs): 66 with mock_fs_scope(fs):
67 app = fs.getApp() 67 app = fs.getApp()
68 s = app.getSource('test') 68 s = app.getSource('test')
69 item = s.findContent({'slug': ref_path}) 69 item = s.findContentFromRoute({'slug': ref_path})
70 assert item is not None 70 assert item is not None
71 assert os.path.relpath(item.spec, app.root_dir) == \ 71 assert os.path.relpath(item.spec, app.root_dir) == \
72 slashfix(expected_path) 72 slashfix(expected_path)
73 assert item.metadata['route_params'] == expected_metadata 73 assert item.metadata['route_params'] == expected_metadata