fixing tests to not rely on __del__