Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code | Sign in
(43)

Side by Side Diff: Lib/unittest/test/testmock/testcallable.py

Issue 25532: infinite loop when running inspect.unwrap over unittest.mock.call
Patch Set: Created 1 year, 10 months ago
Left:
Right:
Use n/p to move between diff chunks; N/P to move between comments. Please Sign in to add in-line comments.
Jump to:
View unified diff | Download patch
« no previous file with comments | « Lib/unittest/mock.py ('k') | Lib/unittest/test/testmock/testhelpers.py » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 # Copyright (C) 2007-2012 Michael Foord & the mock team 1 # Copyright (C) 2007-2012 Michael Foord & the mock team
2 # E-mail: fuzzyman AT voidspace DOT org DOT uk 2 # E-mail: fuzzyman AT voidspace DOT org DOT uk
3 # http://www.voidspace.org.uk/python/mock/ 3 # http://www.voidspace.org.uk/python/mock/
4 4
5 import unittest 5 import unittest
6 from unittest.test.testmock.support import is_instance, X, SomeClass 6 from unittest.test.testmock.support import is_instance, X, SomeClass
7 7
8 from unittest.mock import ( 8 from unittest.mock import (
9 Mock, MagicMock, NonCallableMagicMock, 9 Mock, MagicMock, NonCallableMagicMock,
10 NonCallableMock, patch, create_autospec, 10 NonCallableMock, patch, create_autospec,
(...skipping 128 matching lines...) Expand 10 before | Expand all | Expand 10 after
139 139
140 def test_create_autospec_instance(self): 140 def test_create_autospec_instance(self):
141 mock = create_autospec(SomeClass, instance=True) 141 mock = create_autospec(SomeClass, instance=True)
142 142
143 self.assertRaises(TypeError, mock) 143 self.assertRaises(TypeError, mock)
144 mock.wibble() 144 mock.wibble()
145 mock.wibble.assert_called_once_with() 145 mock.wibble.assert_called_once_with()
146 146
147 self.assertRaises(TypeError, mock.wibble, 'some', 'args') 147 self.assertRaises(TypeError, mock.wibble, 'some', 'args')
148 148
149
150 if __name__ == "__main__": 149 if __name__ == "__main__":
151 unittest.main() 150 unittest.main()
OLDNEW
« no previous file with comments | « Lib/unittest/mock.py ('k') | Lib/unittest/test/testmock/testhelpers.py » ('j') | no next file with comments »

RSS Feeds Recent Issues | This issue
This is Rietveld 894c83f36cb7