Currently the integration tests use the testenv module to set up and tear down test input/output files.
Scenario:
class testFoo(unittesst.TestCase):def setUp(self):testEnv.setUp()` def tearDown(self): testEnv.tearDown() def testSomeStuff(self): dotfilesmanager.setEnv()`
In the example above, when testEnv.tearDown() is called, dotfilesmanager.env will contain real directory names on the host system which will then be torn down.
The design of env / testenv / testfilemocks should be changed so as to make this scenario impossible.
Currently the integration tests use the
testenv
module to set up and tear down test input/output files.Scenario:
testEnv.tearDown()
def testSomeStuff(self):
dotfilesmanager.setEnv()`
class testFoo(unittesst.TestCase):
def setUp(self):
testEnv.setUp()
`
def tearDown(self):In the example above, when
testEnv.tearDown()
is called,dotfilesmanager.env
will contain real directory names on the host system which will then be torn down.The design of
env
/testenv
/testfilemocks
should be changed so as to make this scenario impossible.