derwiki-adroll / mock

Automatically exported from code.google.com/p/mock
BSD 2-Clause "Simplified" License
0 stars 0 forks source link

Passing spec *and* spec_set to patch behaves differently from Mock #145

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
With the mocks, passing (spec=int, spec_set=True) will cause int to be used as 
the spec_set.

With patch, spec_set=True will override spec=int. "spec_set=True" has different 
behaviour with patch *anyway* (it means use the object we are replacing as the 
spec), so passing both spec and spec_set should be disallowed (raise an 
exception).

Original issue reported on code.google.com by fuzzyman on 25 Mar 2012 at 12:40

GoogleCodeExporter commented 9 years ago

Original comment by fuzzyman on 25 Mar 2012 at 3:47

GoogleCodeExporter commented 9 years ago
Fixed on trunk.

Original comment by fuzzyman on 25 Mar 2012 at 4:27