diff options
author | Sascha Silbe <sascha-pgp@silbe.org> | 2011-05-14 17:22:06 (GMT) |
---|---|---|
committer | Sascha Silbe <sascha-pgp@silbe.org> | 2011-05-14 17:22:06 (GMT) |
commit | 7ed2fa4fee85007b0c6b785d5e038d95d463b0bc (patch) | |
tree | debb600a078d92c480113d6bf80c5789a796f453 | |
parent | 5c462c3b9cdba176baae6a161ff75c479ba34c12 (diff) |
runalltests.py: clean entire data store, not just git
If we don't clean out the index, the second and following tests will fail
because they operate on the metadata (but not data) left by the previous
test(s).
All we're interested in keeping across tests are the log files, so remove
everything else.
-rwxr-xr-x | tests/runalltests.py | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/tests/runalltests.py b/tests/runalltests.py index cbe4225..fab15ce 100755 --- a/tests/runalltests.py +++ b/tests/runalltests.py @@ -198,7 +198,12 @@ class TestSuiteWrapper(unittest.TestCase): self._loop.quit() def _clean_data_store(self): - shutil.rmtree(os.path.expanduser('~/.gdatastore/git')) + data_store_dir = os.path.expanduser('~/.gdatastore') + for name in os.listdir(data_store_dir): + if name == 'logs': + continue + + shutil.rmtree(os.path.join(data_store_dir, name)) class TimedTestResult(unittest._TextTestResult): |