finding out which particular tests call some functions?
You can simply raise some exception in the function and do one run. All tests that fail do call you function.
I have some pretty fragile code that I want to refactor.  It's not very easy to unit test by itself because it interacts with database queries and Django form data.
That in itself is not a big deal. I already have extensive tests that, among other things, end up calling this function and check that results are as expected.  But my full test suite takes about 5 minutes and I also don't want to have to fix other outstanding issues while working on this.
What I'd like to do is to run nosetests or nose2 on all my tests, track all test_xxx.py files that called the function of interest and then limit my testing during the refactoring to only that subset of test files.
I plan to use inspect.stack() to do this but was wondering if there is an existing plugin or if someone has done it before.  If not, I intend to post whatever I come up with and maybe that will be of use later.