I have a series of unit tests that I'm running with nose. For some of my tests, I'd like to remove a module's path from the sys.path
so there is no conflict with what I am testing.
sys.path.remove('/path/to/remove/from/sys/path')
If I run the Python interpreter and call sys.path
, the '/path/to/remove/from/sys/path'
is there in the list. However, once nosetests is called, the above code cannot find it and gives me a "not found in list" error.
Why is nose not able to find the path in sys.path
?