close
The Wayback Machine - https://web.archive.org/web/20220402094134/https://github.com/rochacbruno/dynaconf/issues/731
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

[RFC] Add option to skip reloading on validators.validate #731

Open
rochacbruno opened this issue Mar 31, 2022 · 0 comments
Open

[RFC] Add option to skip reloading on validators.validate #731

rochacbruno opened this issue Mar 31, 2022 · 0 comments
Labels
good first issue Not a Bug RFC

Comments

@rochacbruno
Copy link
Owner

@rochacbruno rochacbruno commented Mar 31, 2022

On lines
https://github.com/rochacbruno/dynaconf/blob/master/dynaconf/validator.py#L202-L205

validators.validate is calling from_env and it makes the variables to be reloaded from source files.

This is not good for testing.

Solution:

  1. Check if validation is happening on the same current env, then don't reload
  2. accept argument reload=False that will cause those lines to pass settings direct to the validate_items
@rochacbruno rochacbruno added Not a Bug RFC good first issue labels Mar 31, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
good first issue Not a Bug RFC
Projects
None yet
Development

No branches or pull requests

1 participant