Whole file
testing-cabal/mock
The author described this change as “Fix _spec_signature with a spec of None”. It counts as a record because the check below fails on the code as it stood at 669d5c84e and passes on 738198752, with nothing else changed between the two runs.
Projecttesting-cabal/mock
Fix saved2011-05-17
Sharing licenceBSD-2-Clause · LICENSE.txt
Change size+4 −0
What the code was meant to do, written into the code itself as a save note
Fix _spec_signature with a spec of None
The change
| 1098 | 1098 | if _ids is None: | |
| 1099 | 1099 | _ids = {} | |
| 1100 | 1100 | is_type = False | |
| 1101 | + | ||
| 1102 | + | if spec is None: | |
| 1103 | + | spec = type(None) | |
| 1104 | + | ||
| 1101 | 1105 | _type = type(spec) | |
| 1102 | 1106 | if isinstance(spec, ClassTypes): | |
| 1103 | 1107 | is_type = True |
The check that tells the two apart
fail→pass·tests/testhelpers.py::SpecSignatureTest::test_none
Check file tests/testhelpers.py, taken without changes from the fix and copied onto the older code, so the exact same check runs against both versions.
Origin and history
The code before it669d5c84e338acdf549e149bba00c41f4bbb0665
Broken version dated2011-05-17
Modulemock
Units changed_spec_signature
Fingerprinta8c0f474aceb8d66
Checked2026-08-18 by goldset/0.1
Every field above is generated by our program. None of it is written by hand.
Other bugs found in testing-cabal/mock
- 2023-04-16_get_signature_object
- 2022-12-28create_autospec
- 2020-01-29_patch_dict
- 2020-01-29_patch_object
- 2012-01-22_Call
- 2011-07-19Fix callargs call comparisons