Skip to content
This repository has been archived by the owner on Mar 27, 2022. It is now read-only.

Commit

Permalink
cleaned up broken py3 test; looks like unittest doesn't strip frames …
Browse files Browse the repository at this point in the history
…from exception causes. Not really mocktest's fault, so replaced it with a simpler test
  • Loading branch information
timbertson committed Jan 28, 2013
1 parent 043320a commit 92c748c
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion test/mocktest_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -386,7 +386,10 @@ def ensure_no_mocktest_files_appear_in_failure(failure_func):
ensure_no_mocktest_files_appear_in_failure(lambda slf: slf.assertEqual(False, True))
ensure_no_mocktest_files_appear_in_failure(lambda slf: slf.assertTrue(False))
ensure_no_mocktest_files_appear_in_failure(lambda slf: slf.assertFalse(True))
ensure_no_mocktest_files_appear_in_failure(lambda slf: slf.assertRaises(TypeError, self.make_error))
# ensure_no_mocktest_files_appear_in_failure(lambda slf: slf.assertRaises(TypeError, self.make_error)) # breaks on py3 due to exception contexts, not a big deal...
def mock_failure(slf):
expect(mock()).foo().at_least.once()
ensure_no_mocktest_files_appear_in_failure(mock_failure)

def failing_mock_expectation(slf):
expect(mock()).foo
Expand Down

0 comments on commit 92c748c

Please sign in to comment.