##// END OF EJS Templates
Remove assignment to ip in test files...
Matthias Bussonnier -
Show More
@@ -3,7 +3,6 b' Test for async helpers.'
3
3
4 Should only trigger on python 3.5+ or will have syntax errors.
4 Should only trigger on python 3.5+ or will have syntax errors.
5 """
5 """
6
7 import sys
6 import sys
8 from itertools import chain, repeat
7 from itertools import chain, repeat
9 import nose.tools as nt
8 import nose.tools as nt
@@ -11,7 +10,7 b' from textwrap import dedent, indent'
11 from unittest import TestCase
10 from unittest import TestCase
12 from IPython.testing.decorators import skip_without
11 from IPython.testing.decorators import skip_without
13
12
14 ip = get_ipython()
13
15 iprc = lambda x: ip.run_cell(dedent(x)).raise_error()
14 iprc = lambda x: ip.run_cell(dedent(x)).raise_error()
16 iprc_nr = lambda x: ip.run_cell(dedent(x))
15 iprc_nr = lambda x: ip.run_cell(dedent(x))
17
16
@@ -8,11 +8,6 b" with better-isolated tests that don't rely on the global instance in iptest."
8 from IPython.core.splitinput import LineInfo
8 from IPython.core.splitinput import LineInfo
9 from IPython.core.prefilter import AutocallChecker
9 from IPython.core.prefilter import AutocallChecker
10 from IPython.utils import py3compat
10 from IPython.utils import py3compat
11 from IPython.testing.globalipapp import get_ipython
12
13
14 ip = get_ipython()
15
16
11
17 def doctest_autocall():
12 def doctest_autocall():
18 """
13 """
@@ -3,8 +3,6 b' from IPython.testing.tools import AssertPrints, AssertNotPrints'
3 from IPython.core.displayhook import CapturingDisplayHook
3 from IPython.core.displayhook import CapturingDisplayHook
4 from IPython.utils.capture import CapturedIO
4 from IPython.utils.capture import CapturedIO
5
5
6 ip = get_ipython()
7
8 def test_output_displayed():
6 def test_output_displayed():
9 """Checking to make sure that output is displayed"""
7 """Checking to make sure that output is displayed"""
10
8
@@ -10,7 +10,6 b' import nose.tools as nt'
10 # our own packages
10 # our own packages
11 from IPython.core import autocall
11 from IPython.core import autocall
12 from IPython.testing import tools as tt
12 from IPython.testing import tools as tt
13 from IPython.testing.globalipapp import get_ipython
14 from IPython.utils import py3compat
13 from IPython.utils import py3compat
15
14
16 #-----------------------------------------------------------------------------
15 #-----------------------------------------------------------------------------
@@ -18,7 +17,6 b' from IPython.utils import py3compat'
18 #-----------------------------------------------------------------------------
17 #-----------------------------------------------------------------------------
19
18
20 # Get the public instance of IPython
19 # Get the public instance of IPython
21 ip = get_ipython()
22
20
23 failures = []
21 failures = []
24 num_tests = 0
22 num_tests = 0
@@ -8,14 +8,6 b''
8 import nose.tools as nt
8 import nose.tools as nt
9
9
10 # our own packages
10 # our own packages
11 from IPython.testing.globalipapp import get_ipython
12
13 #-----------------------------------------------------------------------------
14 # Globals
15 #-----------------------------------------------------------------------------
16
17 # Get the public instance of IPython
18 ip = get_ipython()
19
11
20 #-----------------------------------------------------------------------------
12 #-----------------------------------------------------------------------------
21 # Test functions
13 # Test functions
@@ -6,8 +6,6 b' import os.path'
6 import nose.tools as nt
6 import nose.tools as nt
7 from IPython.utils.tempdir import TemporaryDirectory
7 from IPython.utils.tempdir import TemporaryDirectory
8
8
9 _ip = get_ipython()
10
11 def test_logstart_inaccessible_file():
9 def test_logstart_inaccessible_file():
12 try:
10 try:
13 _ip.logger.logstart(logfname="/") # Opening that filename will fail.
11 _ip.logger.logstart(logfname="/") # Opening that filename will fail.
@@ -6,12 +6,10 b''
6 import nose.tools as nt
6 import nose.tools as nt
7
7
8 from IPython.core.prefilter import AutocallChecker
8 from IPython.core.prefilter import AutocallChecker
9 from IPython.testing.globalipapp import get_ipython
10
9
11 #-----------------------------------------------------------------------------
10 #-----------------------------------------------------------------------------
12 # Tests
11 # Tests
13 #-----------------------------------------------------------------------------
12 #-----------------------------------------------------------------------------
14 ip = get_ipython()
15
13
16 def test_prefilter():
14 def test_prefilter():
17 """Test user input conversions"""
15 """Test user input conversions"""
@@ -4,10 +4,6 b''
4 import unittest
4 import unittest
5
5
6 from IPython.core.prompts import LazyEvaluate
6 from IPython.core.prompts import LazyEvaluate
7 from IPython.testing.globalipapp import get_ipython
8
9 ip = get_ipython()
10
11
7
12 class PromptTests(unittest.TestCase):
8 class PromptTests(unittest.TestCase):
13 def test_lazy_eval_unicode(self):
9 def test_lazy_eval_unicode(self):
General Comments 0
You need to be logged in to leave comments. Login now