From 59df9bd4d22715b03d1b765321021a59ebc9366b Mon Sep 17 00:00:00 2001 From: Daniel Narvaez Date: Thu, 29 Nov 2012 22:26:08 +0000 Subject: Git clean not out-of-source modules instead of removing --- (limited to 'tests/devbot/test_git.py') 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() -- cgit v0.9.1