Closed cutz closed 6 years ago
The layer’s (test) setup and tearDown methods seem reasonable to me. Like I mentioned in #45, I’ve seen stdlib test code doing essentially that. The use of dunders isolates any issues, just like storing on a test ivar would. The only unexpected consequence I can see is a few extra strings in memory after the layer is torn down, and a __del__
could handle that if necessary.
Asssuming this solves the problem, LGTM as a bandaid.
This PR attempts to work around issue #45 by trapping the current working directory during test setup and then setting it back after each test is torn down.
I'm storing the current working directory on the layer class which doesn't seem quite right to me. It seems like there could be issues doing that. Should I instead be using the optional arg
test
andfind_test
to store that information on the test being setup and torn down?