rucker / dotfiles-manager

A script to compile your dotfiles!
MIT License
9 stars 0 forks source link

testenv teardown removing prod directories #23

Closed rucker closed 7 years ago

rucker commented 7 years ago

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.