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

Added uncurse() function #17

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open

Conversation

adamestein
Copy link

Whereas reverse() removed the specified attribute, uncurse() will restore the previous value (assuming there was one). If the attribute is new (rather than overwritten), it is simply deleted just as reverse() would do (since there was no previous value to go back to).

Also added unit tests, updated README, and updated version number.

This came out of the need to restore datetime.now() since I'm running many unit tests and the one test that 'cursed' datetime.now() affects any unit tests running after that use that method. reverse() simply deleted now() so it didn't exist anymore. Needed it restored back to the original function.

@alexchandel
Copy link

This looks interesting. @adamestein Rebase your PR and update for master's changes

@adamestein
Copy link
Author

adamestein commented Nov 19, 2019 via email

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants