Merged
Conversation
… `wn` in tests Running `wn.Download()` before changing the config location just ends up causing problems and dowloading it again for the new location.
This comment was marked as resolved.
This comment was marked as resolved.
f03b008 to
79400c3
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
wnconfig overrides fromWordnetBlockedWordsbefore usingwnin testswn.Download()before changing the config location just ends up causing problems and dowloading it again for the new location.langand pass it through town.WordnetinWordnetBlockedWordsAn alternative may be to move the
wn.configchanges to the root ofgarak/probes/topic.pyso it always happens when it's imported.This was a problem for me with NixOS/nixpkgs#429835 since nix builds don't have internet access. I was trying to allow for enabling these tests, I found out how to load lexicons from pre-fetched files (goodmami/wn#278) but garak tests weren't fully finding it.
If I loaded them to the default location the initial setup for the test worked but then garak couldn't find the lexicon when actually running. If I loaded them to the garak changed location the test wouldn't start at all. If I loaded them to both locations, default first, then garak, it'd still have problems.
After loading it to the location garak usually expects & adding this to the test it works completely fine:
For the lang change if it's not intended to be sent to
wn.Wordnetit's not immediately obvious to me what it is actually for.