Use __future__.absolute_import for spies function.
Review Request #8720 — Created Feb. 6, 2017 and submitted
I was encountering a bizarre problem where running a unit test that included a
spy was failing withImportError: cannot import name currentframe. After
doing some digging, I found out that theinspectmodule that was being
imported was actuallydjango.utils.inspectrather than the top-level
standard libraryinspect. Addingabsolute_importfixes this.
Was able to run my unit test successfully.
Tool: Pyflakes Processed Files: kgb/spies.py Tool: PEP8 Style Checker Processed Files: kgb/spies.py