##// END OF EJS Templates
remove python2 specific code
Srinivas Reddy Thatiparthy -
Show More
@@ -16,10 +16,8 b' import shutil'
16 16 import sys
17 17 import tempfile
18 18 import unittest
19 try:
20 from unittest import mock
21 except ImportError:
22 import mock
19 from unittest import mock
20
23 21 from os.path import join
24 22
25 23 import nose.tools as nt
@@ -4,11 +4,7 b' import shutil'
4 4 import sys
5 5 import tempfile
6 6 import warnings
7
8 try: # Python 3
9 from unittest.mock import patch
10 except ImportError: # Python 2
11 from mock import patch
7 from unittest.mock import patch
12 8
13 9 import nose.tools as nt
14 10 from testpath import modified_env, assert_isdir, assert_isfile
@@ -20,11 +20,7 b' import random'
20 20 import sys
21 21 import textwrap
22 22 import unittest
23
24 try:
25 from unittest.mock import patch
26 except ImportError:
27 from mock import patch
23 from unittest.mock import patch
28 24
29 25 import nose.tools as nt
30 26 from nose import SkipTest
@@ -7,11 +7,7 b' import os.path'
7 7 from textwrap import dedent
8 8 import traceback
9 9 import unittest
10
11 try:
12 from unittest import mock
13 except ImportError:
14 import mock # Python 2
10 from unittest import mock
15 11
16 12 from ..ultratb import ColorTB, VerboseTB, find_recursion
17 13
@@ -11,19 +11,12 b' import sys'
11 11 import tempfile
12 12 import warnings
13 13 from contextlib import contextmanager
14
15 try: # Python 3.3+
16 from unittest.mock import patch
17 except ImportError:
18 from mock import patch
19
14 from unittest.mock import patch
20 15 from os.path import join, abspath, split
21 16
22 from nose import SkipTest
17 from nose import SkipTest, with_setup
23 18 import nose.tools as nt
24 19
25 from nose import with_setup
26
27 20 import IPython
28 21 from IPython import paths
29 22 from IPython.testing import decorators as dec
General Comments 0
You need to be logged in to leave comments. Login now