Beispiel #1
0
def test_generic_template(mock_mp_stubs, tmp_path):
    prov = TemplateProvider(['bootstrap', 'pymakr'])
    prov.render_to('boot', tmp_path)
    expected_path = tmp_path / 'src' / 'boot.py'
    assert expected_path.exists()
    expected_content = (prov.TEMPLATE_DIR / 'src' / 'boot.py').read_text()
    out_content = expected_path.read_text()
    print(out_content)
    assert expected_content.strip() == out_content.strip()
    templ = prov.get('boot')
    assert templ.update(tmp_path) is None
Beispiel #2
0
def test_generic_template(mock_mp_stubs, tmp_path):
    prov = TemplateProvider(["bootstrap", "pymakr"])
    prov.render_to("boot", tmp_path)
    expected_path = tmp_path / "src" / "boot.py"
    assert expected_path.exists()
    expected_content = (prov.TEMPLATE_DIR / "src" / "boot.py").read_text()
    out_content = expected_path.read_text()
    print(out_content)
    assert expected_content.strip() == out_content.strip()
    templ = prov.get("boot")
    assert templ.update(tmp_path) is None