Created
June 15, 2016 20:25
-
-
Save ssanderson/3ec388a62c8e721c9fd1d6f6c3b7e7d7 to your computer and use it in GitHub Desktop.
Machete-mode debugging, ala https://www.youtube.com/watch?v=bAcfPzxB3dk.
This file contains 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
# td is a TemporaryDirectory that's being deleted earlier than | |
# expected somewhere in my test suite. | |
import shutil | |
old_rmtree = shutil.rmtree | |
def rmtree(path, *args, **kwargs): | |
if path == td.name: | |
import nose.tools; nose.tools.set_trace() | |
return old_rmtree(path, *args, **kwargs) | |
shutil.rmtree = rmtree |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment