Add more tests

I think moving this into another method is a good idea independendly of the `locals` question. I think `locals` would still be better, but I don't care as much here.