Closed aokellermann closed 3 years ago
Hi @aokellermann -- thanks! I think these are worthwhile changes.
new_spellings_only_current_session
, and the fact that it's a member variable intended to be set outside of the class. Why not pass it into the constructor? I'd also like to suggest the name new_spellings_persist
(and have it mean the opposite of current meaning), though I'm open to ideas._unregister_spellings
seems like a difficult bit of code to write and could be error prone. Do you mind adding a test for this method?@jxmorris12
I agree -- I think new_spellings_persist
is a better name.
I already added a test case in test_major_functionality.py
that compares file hashes before registering and after unregistering. You can see it fail here. The function is fairly ugly, but fast. I couldn't think of a better way to do it.
@jxmorris12
I agree -- I think
new_spellings_persist
is a better name.I already added a test case in
test_major_functionality.py
that compares file hashes before registering and after unregistering. You can see it fail here. The function is fairly ugly, but fast. I couldn't think of a better way to do it.
Works for me! Great work, thanks so much
Changes
__del__
function (that is never actually called in my testing) in favor of context manager.