Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

[#81] Started cleaning up test directories

  • Loading branch information...
commit 3475a1c08df62f1c7c4f84d85d5a56f588ca6587 1 parent c5878e6
Lukasz Balcerzak lukaszb authored
Showing with 14 additions and 0 deletions.
  1. +14 −0 vcs/tests/base.py
14 vcs/tests/base.py
View
@@ -2,8 +2,10 @@
Module providing backend independent mixin class. It requires that
InMemoryChangeset class is working properly at backend class.
"""
+import os
import vcs
import time
+import shutil
import datetime
from vcs.utils.compat import unittest
@@ -78,10 +80,22 @@ def setUpClass(cls):
author=commit['author'],
date=commit['date'])
+ @classmethod
+ def tearDownClass(cls):
+ if not getattr(cls, 'recreate_repo_per_test', False) and \
+ 'VCS_REMOVE_TEST_DIRS' in os.environ:
+ shutil.rmtree(cls.repo_path)
+
def setUp(self):
if getattr(self, 'recreate_repo_per_test', False):
self.__class__.setUpClass()
+ def tearDown(self):
+ if getattr(self, 'recreate_repo_per_test', False) and \
+ 'VCS_REMOVE_TEST_DIRS' in os.environ:
+ shutil.rmtree(self.repo_path)
+
+
# For each backend create test case class
for alias in SCM_TESTS:
Please sign in to comment.
Something went wrong with that request. Please try again.