Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

config: set default on missing default_context key #1516

Merged

Conversation

simobasso
Copy link
Member

@simobasso simobasso commented Apr 11, 2021

Closes: #1514
Closes: #1149

@acturner
Copy link

acturner commented Apr 11, 2021

EDIT: Fixed #1514 but not #1513 (the latter error coming from poyo).

For testing, you can clone cookiecutter-value-error and then run:

cookiecutter cookiecutter-value-error --config-file=cookiecutter-value-error/init.yaml --no-input

@simobasso
Copy link
Member Author

@acturner thanks, just updated the description and also, I've found #1149 that seems the same issue.

@simobasso simobasso force-pushed the bugfix/set_default_on_default_context branch from 4609471 to cc92e3c Compare April 22, 2021 22:01
@glumia
Copy link
Contributor

glumia commented Apr 24, 2021

lgtm!

The fact you had to update both tests/test_get_config.py::test_get_config and tests/test_get_user_config.py::custom_config after editing tests/test-config/valid-config.yaml is a clear sign of code duplication, we should have a single fixture as source of truth of file's content. @simobasso do you think it would be worth to open a refactor issue for that?

@simobasso
Copy link
Member Author

Sure @glumia! Feel free to open an issue on this!

@simobasso simobasso added the bug This issue/PR relates to a bug. label Apr 26, 2021
@simobasso simobasso merged commit 70a29d3 into cookiecutter:master Apr 29, 2021
@simobasso simobasso mentioned this pull request May 15, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug This issue/PR relates to a bug.
Projects
None yet
3 participants