Running the following test w/ nose:
def test_mock_open(self):
assert 1 == 2
I get the traceback:
Traceback (most recent call last):
File "/home/<snip>/nose/case.py", line 187, in runTest
self.test(*self.arg)
File "/home/<snip>/tests/test_deps.py", line 68, in test_mock_open
assert 1 == 2
AssertionError
But, if I patch it:
@mock.patch('__builtin__.open')
def test_mock_open(self, m_open):
assert 1 == 2
Then my traceback is missing the last frame:
Traceback (most recent call last):
File "/home/<snip>/nose/case.py", line 187, in runTest
self.test(*self.arg)
AssertionError
This can make troubleshooting your tests VERY annoying if you have similar
assertion messages in a test b/c you don't know which test is the one that is
failing.
Original issue reported on code.google.com by rsyr...@gmail.com on 24 Jun 2011 at 4:28
Original issue reported on code.google.com by
rsyr...@gmail.com
on 24 Jun 2011 at 4:28