A cleaner testing approach

I've changed the way I'm approaching testing, slightly.  Should
hopefully be cleaner (and safer thanks to context managers)