Skip to content

Fix tests that are broken under Python 2.7. #86

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 2 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion git/test/lib/helper.py
Original file line number Diff line number Diff line change
Expand Up @@ -227,7 +227,7 @@ class TestBase(TestCase):
"""

@classmethod
def setUpAll(cls):
def setUpClass(cls):
"""
Dynamically add a read-only repository to our actual type. This way
each test type has its own repository
Expand Down
10 changes: 5 additions & 5 deletions git/test/performance/lib.py
Original file line number Diff line number Diff line change
Expand Up @@ -51,8 +51,8 @@ class TestBigRepoR(TestBase):
#} END invariants

@classmethod
def setUpAll(cls):
super(TestBigRepoR, cls).setUpAll()
def setUpClass(cls):
super(TestBigRepoR, cls).setUpClass()
repo_path = resolve_or_fail(k_env_git_repo)
cls.gitrorepo = Repo(repo_path, odbt=GitCmdObjectDB)
cls.puregitrorepo = Repo(repo_path, odbt=GitDB)
Expand All @@ -64,15 +64,15 @@ class TestBigRepoRW(TestBigRepoR):
Provides ``self.gitrwrepo`` and ``self.puregitrwrepo``"""

@classmethod
def setUpAll(cls):
super(TestBigRepoRW, cls).setUpAll()
def setUpClass(cls):
super(TestBigRepoRW, cls).setUpClass()
dirname = tempfile.mktemp()
os.mkdir(dirname)
cls.gitrwrepo = cls.gitrorepo.clone(dirname, shared=True, bare=True, odbt=GitCmdObjectDB)
cls.puregitrwrepo = Repo(dirname, odbt=GitDB)

@classmethod
def tearDownAll(cls):
def tearDownClass(cls):
shutil.rmtree(cls.gitrwrepo.working_dir)

#} END base classes
4 changes: 2 additions & 2 deletions git/test/test_git.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,8 @@
class TestGit(TestBase):

@classmethod
def setUpAll(cls):
super(TestGit, cls).setUpAll()
def setUpClass(cls):
super(TestGit, cls).setUpClass()
cls.git = Git(cls.rorepo.working_dir)

@patch_object(Git, 'execute')
Expand Down