moved test teardown code into setup so effects can be seen on tests that fail