def test_readme_has_terminating_newline(noarch_recipe, jinja_env): cnfgr_fdstk.render_README(jinja_env=jinja_env, forge_config=noarch_recipe.config, forge_dir=noarch_recipe.recipe) readme_path = os.path.join(noarch_recipe.recipe, 'README.md') assert os.path.exists(readme_path) with open(readme_path, 'rb') as readme_file: readme_file.seek(-1, os.SEEK_END) assert readme_file.read() == b'\n'
def test_render_with_all_skipped_generates_readme(skipped_recipe, jinja_env): cnfgr_fdstk.render_README( jinja_env=jinja_env, forge_config=skipped_recipe.config, forge_dir=skipped_recipe.recipe, ) readme_path = os.path.join(skipped_recipe.recipe, "README.md") assert os.path.exists(readme_path) with open(readme_path, "rb") as readme_file: content = readme_file.read() assert b"skip-test-meta" in content
def test_readme_has_terminating_newline(noarch_recipe, jinja_env): cnfgr_fdstk.render_README( jinja_env=jinja_env, forge_config=noarch_recipe.config, forge_dir=noarch_recipe.recipe, ) readme_path = os.path.join(noarch_recipe.recipe, "README.md") assert os.path.exists(readme_path) with open(readme_path, "rb") as readme_file: readme_file.seek(-1, os.SEEK_END) assert readme_file.read() == b"\n"
def test_files_skip_render(render_skipped_recipe, jinja_env): cnfgr_fdstk.render_README( jinja_env=jinja_env, forge_config=render_skipped_recipe.config, forge_dir=render_skipped_recipe.recipe, ) cnfgr_fdstk.copy_feedstock_content(render_skipped_recipe.config, render_skipped_recipe.recipe) skipped_files = [ ".gitignore", ".gitattributes", "README.md", "LICENSE.txt" ] for f in skipped_files: fpath = os.path.join(render_skipped_recipe.recipe, f) assert not os.path.exists(fpath)
def test_render_with_all_skipped_generates_readme(skipped_recipe, jinja_env): cnfgr_fdstk.render_README(jinja_env=jinja_env, forge_config=skipped_recipe.config, forge_dir=skipped_recipe.recipe)
def test_render_with_all_skipped_generates_readme(skipped_recipe, jinja_env): cnfgr_fdstk.render_README( jinja_env=jinja_env, forge_config=skipped_recipe.config, forge_dir=skipped_recipe.recipe, )