Skip to content

Refactor generate_package fixture to avoid repetition in tests #522

@matt-graham

Description

@matt-graham

Is Your Feature Request Related to a Problem? Please Describe

We repeating (slight variations of) this snippet

test_config = {
"github_owner": "test-user",
"project_short_description": "description",
"project_name": "Cookiecutter Test",
}
generate_package(config=test_config, path=tmp_path)
test_project_dir = tmp_path / "cookiecutter-test"

across a lot of tests.

Describe the Solution You'd Like

I think it would be nicer to have generate_package return the path to the directory the package is created in (test_project_dir) based on the passed tmp_path and config["project_name"] and to have a default_package_config fixture to avoid the repetition of the config specification.

Describe Alternatives You've Considered

No response

Additional Context

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions