The library module random exposes as its main API "functions" on the
module level which are actually bound methods detached from a singleton
Random() instance.
If a user mocked these, for example random.randint, these were not
restored correctly on unstub but deleted.
We hotfix here by adding another check (ismodule).
Fixes #53
The library module
random
exposes as its main API "functions" on the module level which are actually bound methods detached from a singletonRandom()
instance.If a user mocked these, for example
random.randint
, these were not restored correctly onunstub
but deleted.We hotfix here by adding another check (
ismodule
).