diff options
Diffstat (limited to 'tests/devbot/test_git.py')
-rw-r--r-- | tests/devbot/test_git.py | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/tests/devbot/test_git.py b/tests/devbot/test_git.py index 9468814..f5aca8e 100644 --- a/tests/devbot/test_git.py +++ b/tests/devbot/test_git.py @@ -102,5 +102,19 @@ class TestGit(unittest.TestCase): self.assertEquals("detachedchange", self._read_file(module)) + def test_clean(self): + module = self._setup_module() + module.update() + + to_clean_path = os.path.join(module.local, "changetoclean") + + f = open(to_clean_path, "w") + f.write("") + f.close() + + self.assertTrue(os.path.exists(to_clean_path)) + module.clean() + self.assertFalse(os.path.exists(to_clean_path)) + if __name__ == '__main__': unittest.main() |