diff options
author | Sebastian Thiel <byronimo@gmail.com> | 2015-01-03 20:25:01 +0100 |
---|---|---|
committer | Sebastian Thiel <byronimo@gmail.com> | 2015-01-03 20:31:18 +0100 |
commit | f2840c626d2eb712055ccb5dcbad25d040f17ce1 (patch) | |
tree | 15b771106a507fe284ab610bf0d141fa9255f4f2 /git/test/performance/lib.py | |
parent | 342a0276dbf11366ae91ce28dcceddc332c97eaf (diff) | |
download | gitpython-f2840c626d2eb712055ccb5dcbad25d040f17ce1.tar.gz |
Auto-skip performance tests more quietly on travis
... and be able to run performance tests independently of the chosen performance test repo
Now all tests run fine locally
Diffstat (limited to 'git/test/performance/lib.py')
-rw-r--r-- | git/test/performance/lib.py | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/git/test/performance/lib.py b/git/test/performance/lib.py index 985e3637..9b6f45bf 100644 --- a/git/test/performance/lib.py +++ b/git/test/performance/lib.py @@ -1,6 +1,7 @@ """Contains library functions""" import os from git.test.lib import * +from gitdb.test.lib import skip_on_travis_ci import shutil import tempfile import logging @@ -36,11 +37,11 @@ class TestBigRepoR(TestBase): """ #{ Invariants - head_sha_2k = '235d521da60e4699e5bd59ac658b5b48bd76ddca' - head_sha_50 = '32347c375250fd470973a5d76185cac718955fd5' #} END invariants def setUp(self): + # This will raise on travis, which is what we want to happen early as to prevent us to do any work + skip_on_travis_ci(lambda *args: None)(self) try: super(TestBigRepoR, self).setUp() except AttributeError: @@ -54,7 +55,6 @@ class TestBigRepoR(TestBase): self.gitrorepo = Repo(repo_path, odbt=GitCmdObjectDB) self.puregitrorepo = Repo(repo_path, odbt=GitDB) - class TestBigRepoRW(TestBigRepoR): """As above, but provides a big repository that we can write to. @@ -62,6 +62,7 @@ class TestBigRepoRW(TestBigRepoR): Provides ``self.gitrwrepo`` and ``self.puregitrwrepo``""" def setUp(self): + self.gitrwrepo = None try: super(TestBigRepoRW, self).setUp() except AttributeError: @@ -72,6 +73,7 @@ class TestBigRepoRW(TestBigRepoR): self.puregitrwrepo = Repo(dirname, odbt=GitDB) def tearDown(self): - shutil.rmtree(self.gitrwrepo.working_dir) + if self.gitrwrepo is not None: + shutil.rmtree(self.gitrwrepo.working_dir) #} END base classes |