hRobert12 / mock

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

A "falsey" spec can result in incorrect behaviour with patch #144

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
patch checks if there is a spec with:

    if (spec or spec_set) is not None:

If spec is not None but still evaluates to False, and spec_set is None, then 
this can give an incorrect result: "spec or spec_set" will evaluate to None.

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

GoogleCodeExporter commented 8 years ago

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

GoogleCodeExporter commented 8 years ago
Fixed on trunk.

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