Skip to content

Commit

Permalink
Fix incompatibility with python2.6, where unittest doesn't provide sk…
Browse files Browse the repository at this point in the history
…ipIf.

Signed-off-by: Jelmer Vernooij <jelmer@samba.org>
  • Loading branch information
jelmer committed Nov 8, 2014
1 parent 058b3e9 commit 5a525e7
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 7 deletions.
4 changes: 2 additions & 2 deletions dulwich/tests/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -30,9 +30,9 @@
# If Python itself provides an exception, use that
import unittest
if sys.version_info < (2, 7):
from unittest2 import SkipTest, TestCase as _TestCase
from unittest2 import SkipTest, TestCase as _TestCase, skipIf
else:
from unittest import SkipTest, TestCase as _TestCase
from unittest import SkipTest, TestCase as _TestCase, skipIf


def get_safe_env(env=None):
Expand Down
9 changes: 4 additions & 5 deletions dulwich/tests/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,10 +28,6 @@
import time
import types

from unittest import (
SkipTest,
skipIf,
)
import warnings

from dulwich.index import (
Expand All @@ -52,7 +48,10 @@
create_delta,
)
from dulwich.repo import Repo
from dulwich.tests import SkipTest
from dulwich.tests import (
SkipTest,
skipIf,
)


# Plain files are very frequently used in tests, so let the mode be very short.
Expand Down

0 comments on commit 5a525e7

Please sign in to comment.