def test_bundle_parse(patch, bundle): parse = bundle.parse patch.many(Bundle, ['parse', 'load_story']) parse(['one.story'], None, lower=False) Bundle.load_story.assert_called_with('one.story') story = Bundle.load_story() assert bundle.stories['one.story'] == story.tree
def test_bundle_parse(patch, bundle): patch.many(Bundle, ['parse_modules', 'load_story']) bundle.parse(['one.story'], None) Bundle.load_story.assert_called_with('one.story') story = Bundle.load_story() Bundle.parse_modules.assert_called_with(story.modules(), None) assert bundle.stories['one.story'] == story.tree
def test_bundle_parse(patch, bundle): parse = bundle.parse patch.many(Bundle, ["parse", "load_story"]) parse(["one.story"], None, lower=False) Bundle.load_story.assert_called_with("one.story") story = Bundle.load_story() assert bundle.stories["one.story"] == story.tree
def test_bundle_compile(mocker, patch, bundle): compile = bundle.compile patch.many(Bundle, ['compile', 'load_story']) patch.many(Story, ['parse']) compile(['one.story'], parser=None) Bundle.load_story.assert_called_with('one.story') story = Bundle.load_story() story.compile.assert_called() assert bundle.stories['one.story'] == story.compiled.output()
def test_bundle_compile(mocker, patch, bundle): patch.many(Bundle, ['compile_modules', 'load_story']) patch.many(Story, ['parse']) bundle.compile(['one.story'], None) Bundle.load_story.assert_called_with('one.story') story = Bundle.load_story() Bundle.compile_modules.assert_called_with(story.modules(), None) story.compile.assert_called() assert bundle.stories['one.story'] == story.compiled
def test_bundle_compile(mocker, patch, bundle): compile = bundle.compile patch.many(Bundle, ["compile", "load_story"]) patch.many(Story, ["parse"]) compile(["one.story"], parser=None) Bundle.load_story.assert_called_with("one.story") story = Bundle.load_story() story.compile.assert_called() assert bundle.stories["one.story"] == story.compiled.output()