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