Ejemplo n.º 1
0
def test_make_structure_with_pre_commit_hooks():
    args = ["project",
            "-p", "package",
            "-d", "description",
            "--with-pre-commit"]
    args = runner.parse_args(args)
    args = structure.set_default_args(args)
    struct = structure.make_structure(args)
    assert isinstance(struct, dict)
    assert ".pre-commit-config.yaml" in struct["project"]
Ejemplo n.º 2
0
def test_make_structure_with_tox():
    args = ["project",
            "-p", "package",
            "-d", "description",
            "--with-tox"]
    args = runner.parse_args(args)
    args = structure.set_default_args(args)
    struct = structure.make_structure(args)
    assert isinstance(struct, dict)
    assert "tox.ini" in struct["project"]
    assert isinstance(struct["project"]["tox.ini"], six.string_types)
Ejemplo n.º 3
0
def test_set_default_args():
    args = ["project", "-p", "package", "-d", "description"]
    args = runner.parse_args(args)
    new_args = structure.set_default_args(args)
    assert not hasattr(args, "author")
    assert hasattr(new_args, "author")
Ejemplo n.º 4
0
def test_set_default_args():
    args = ["project", "-p", "package", "-d", "description"]
    args = runner.parse_args(args)
    new_args = structure.set_default_args(args)
    assert not hasattr(args, "author")
    assert hasattr(new_args, "author")
Ejemplo n.º 5
0
def test_make_structure():
    args = ["project", "-p", "package", "-d", "description"]
    args = runner.parse_args(args)
    args = structure.set_default_args(args)
    struct = structure.make_structure(args)
    assert isinstance(struct, dict)