Skip to content Skip to sidebar Skip to footer
Showing posts with the label Monkeypatching

Testing Asyncio With Pytest: How To Test A Try-except Block By Mocking The Event Loop?

In a source code (source link here and WIP PR here) I am working with, I am trying to improve test … Read more Testing Asyncio With Pytest: How To Test A Try-except Block By Mocking The Event Loop?

Monkeypatching Not Carrying Through Class Import

I'm trying to test some code using pytest and need to change a function from some module. One o… Read more Monkeypatching Not Carrying Through Class Import

Really Weird... Can't Set Attributes Of Built-in/extension Type 'lxml.etree._element'

I've changed attributes for other classes before without issues. _Element is obviously not a bu… Read more Really Weird... Can't Set Attributes Of Built-in/extension Type 'lxml.etree._element'