diff options
author | Daniel Narvaez <dwnarvaez@gmail.com> | 2012-11-29 22:26:08 (GMT) |
---|---|---|
committer | Daniel Narvaez <dwnarvaez@gmail.com> | 2012-11-29 22:34:33 (GMT) |
commit | 59df9bd4d22715b03d1b765321021a59ebc9366b (patch) | |
tree | be1075a9e3a3c2d4908735e948e0d73d690ba9dd /tests/devbot/test_git.py | |
parent | 48c02f188784d65bd501a907e572e041ed61dc15 (diff) |
Git clean not out-of-source modules instead of removing
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() |