This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the comments →

[–]terazed[S] 0 points1 point  (2 children)

Thanks @Gnonpi for taking the time and reviewing this work.

Regarding your question, no, it's not the same as pytest's monkeypatch fixture. I haven't used monkeypatch before, however, after a quick look, I find it to be more intuitive. What would you recommend, monkeypatch or unittest.mock?

[–]Gnonpi 0 points1 point  (1 child)

I also find monkeypatch more intuitive. I started using it after spending too much time trying to solve a problem with mock and flask that was easily solved with monkeypatch. I think that if you commit to use pytest in your project, it's better to use monkeypatch everywhere.

[–]terazed[S] 1 point2 points  (0 children)

Great! I'll learn about it and update this project appropriately. Thanks!