-
Notifications
You must be signed in to change notification settings - Fork 164
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
Can not modify presets across tests #424
Comments
This is to prevent repeated parsing for performance reasons but you're right it doesn't get cleared out when the configuration is reloaded. What's the best fix, should the presets be cached in the configuration object instead? |
But then they will have to be refreshed on each |
Oh, I didn't notice that _load_presets is only called from update_config. Let's simply remove those two lines. |
Looks like the first time presets are loaded they are set for the rest of the session. This causes problems in tests that load different sets of presets, e.g.
When run individually,
test_other.py
will run fine, but iftest_something.py
has been run before it will fail withLooks like these lines prevent further re-loading of the presets on each
update_config()
call:ckanext-scheming/ckanext/scheming/plugins.py
Lines 106 to 107 in 27035f4
Is this just for performance reasons @wardi ? or to avoid conflicts?
The text was updated successfully, but these errors were encountered: