Ejemplo n.º 1
0
def test__check_get_schematic_dirname(test_flaskerize_args, tmp_path):
    tmp_pkg_path = os.path.join(tmp_path, "some/pkg")
    os.makedirs(tmp_pkg_path)
    fz = Flaskerize(test_flaskerize_args)

    with pytest.raises(ValueError):
        fz._check_get_schematic_dirname(tmp_pkg_path)
Ejemplo n.º 2
0
def test__check_get_schematic_dirname_doesnt_append_if_already_schematics(
        test_flaskerize_args, tmp_path):
    tmp_pkg_path = os.path.join(tmp_path, "some/pkg/schematics")
    os.makedirs(tmp_pkg_path)
    fz = Flaskerize(test_flaskerize_args)

    dirname = fz._check_get_schematic_dirname(tmp_pkg_path)

    expected = tmp_pkg_path
    assert dirname == expected