def test__generate_with_adds_extension(tmp_path): from os import path from flaskerize.generate import _generate CONTENTS = "asdf" output_name = path.join(tmp_path, "file") _generate(contents=CONTENTS, output_name=output_name, dry_run=False) assert path.isfile(output_name + ".py")
def test__generate_with_dry_run(tmp_path): from os import path from flaskerize.generate import _generate CONTENTS = "asdf" output_name = path.join(tmp_path, "some/file") _generate(contents=CONTENTS, output_name=output_name, dry_run=True) assert not path.isfile(output_name)