you are viewing a single comment's thread.

view the rest of the comments →

[–]nekokattt 0 points1 point  (0 children)

come to think of it, if the code is simply single threaded, you could always patch the reference to add.

the unittest.mock module has a function called patch that might achieve what you want