Open jonathan-benn opened 7 years ago
This feature is not exist in previous version I remember. I have tried to implement this at first, but later I found this feature is not exist in SinonJS old version, thus I skipped it.
What I tried to implement this is used deepcopy
whole module before, and it didn't work. Also, I have asked this question on StackOverflow before - https://stackoverflow.com/questions/40283493/how-to-deepcopy-a-module-in-python
I believe this should be a low priority issue, since the effort might be too big by implementing own deepcopy
.
stub.__init__ -> module -> deepcopy -> replace all module's function
stub.restore -> replace all module's function again from deepcopy
Do you have any idea about this?
This one isn't a very important feature of Sinon.JS, since the author recommends that you only stub one method at a time, as is already supported by Sinon.PY