<div dir="ltr">I was toying with refactoring my plugin code the other day, but I thought I would add some unit tests using pytest before I started to make sure I didn't break anything. But when I try something like:<div><br></div>def test_convertGridRef():    <br>     QgsExpression.registerFunction(convertGridRef)    <br>     e = QgsExpression('convertGridRef("SE2720")')    <br><div>     assert e.evaluate(None) == 'POINT (427000 420000)' <br clear="all"><div><br></div><div>e.evaluate returns None - when it should either return a point or an exception</div><div><br></div><div>Does anyone have some good plugin unit test examples I can take a look at?</div><div><br></div><div>Thanks</div><div><br></div><div>Ian</div>-- <br><div dir="ltr" class="gmail_signature" data-smartmail="gmail_signature">Ian Turton<br></div></div></div>