Lines Matching refs:spec

260         @patch('%s.SomeClass' % __name__, spec=SomeClass)
270 @patch.object(SomeClass, 'class_attribute', spec=SomeClass)
282 @patch('%s.SomeClass' % __name__, spec=['wibble'])
292 @patch.object(SomeClass, 'class_attribute', spec=['wibble'])
306 @patch('%s.SomeClass' % __name__, spec=['wibble'])
315 @patch('%s.SomeClass' % __name__, spec=True)
327 @patch.object(PTModule, 'SomeClass', spec=True)
339 @patch('%s.SomeClass' % __name__, spec=True)
685 @patch('%s.SomeClass' % __name__, spec=SomeClass, spec_set=True)
691 @patch.object(support, 'SomeClass', spec=SomeClass, spec_set=True)
1136 patcher = patch(foo_name, new_callable=Bar, spec=Bar)
1139 self.assertEqual(Bar.kwargs, dict(spec=Bar))
1194 for arg in 'spec', 'spec_set':
1207 def __init__(self, spec):
1208 self.spec = spec
1210 p = patch(foo_name, new_callable=NotAMock, spec=True)
1218 self.assertEqual(m.spec, Foo)
1434 # if spec_set works then we can assume that spec and autospec also
1632 for arg in ('spec', 'autospec', 'spec_set'):
1656 for arg in ('spec', 'autospec', 'spec_set'):
1732 for kwarg in ('spec', 'spec_set', 'autospec'):
1738 # check that spec with create is innocuous if the original exists
1746 for kwarg in ('spec', 'spec_set'):
1751 for kwarg in ('spec', 'autospec'):
1757 p = patch(MODNAME, spec=0, **{kwarg: 0})
1763 p = patch(MODNAME, spec=False, spec_set=False, autospec=False)
1766 # no spec should have been set, so attribute access should not fail
1774 for kwarg in ('spec', 'autospec', 'spec_set'):
1784 for kwarg in ('spec', 'autospec'):
1796 spec = ('__call__',)
1797 p = patch(MODNAME, spec=spec)
1806 spec = ('foo', 'bar')
1807 p = patch(MODNAME, spec=spec)