##// END OF EJS Templates
Remove most uses of ParametricTestCase
Thomas Kluyver -
Show More
@@ -24,7 +24,6 b' import zmq'
24 from nose import SkipTest
24 from nose import SkipTest
25
25
26 from IPython.testing import decorators as dec
26 from IPython.testing import decorators as dec
27 from IPython.testing.ipunittest import ParametricTestCase
28 from IPython.utils.io import capture_output
27 from IPython.utils.io import capture_output
29
28
30 from IPython import parallel as pmod
29 from IPython import parallel as pmod
@@ -39,7 +38,7 b' from .clienttest import ClusterTestCase, generate_output'
39 def setup():
38 def setup():
40 add_engines(3, total=True)
39 add_engines(3, total=True)
41
40
42 class TestParallelMagics(ClusterTestCase, ParametricTestCase):
41 class TestParallelMagics(ClusterTestCase):
43
42
44 def test_px_blocking(self):
43 def test_px_blocking(self):
45 ip = get_ipython()
44 ip = get_ipython()
@@ -29,7 +29,6 b' from nose import SkipTest'
29 from nose.plugins.attrib import attr
29 from nose.plugins.attrib import attr
30
30
31 from IPython.testing import decorators as dec
31 from IPython.testing import decorators as dec
32 from IPython.testing.ipunittest import ParametricTestCase
33 from IPython.utils.io import capture_output
32 from IPython.utils.io import capture_output
34
33
35 from IPython import parallel as pmod
34 from IPython import parallel as pmod
@@ -47,7 +46,7 b' def setup():'
47
46
48 point = namedtuple("point", "x y")
47 point = namedtuple("point", "x y")
49
48
50 class TestView(ClusterTestCase, ParametricTestCase):
49 class TestView(ClusterTestCase):
51
50
52 def setUp(self):
51 def setUp(self):
53 # On Win XP, wait for resource cleanup, else parallel test group fails
52 # On Win XP, wait for resource cleanup, else parallel test group fails
@@ -512,17 +511,17 b' class TestView(ClusterTestCase, ParametricTestCase):'
512 def test_len(self):
511 def test_len(self):
513 """len(view) makes sense"""
512 """len(view) makes sense"""
514 e0 = self.client[self.client.ids[0]]
513 e0 = self.client[self.client.ids[0]]
515 yield self.assertEqual(len(e0), 1)
514 self.assertEqual(len(e0), 1)
516 v = self.client[:]
515 v = self.client[:]
517 yield self.assertEqual(len(v), len(self.client.ids))
516 self.assertEqual(len(v), len(self.client.ids))
518 v = self.client.direct_view('all')
517 v = self.client.direct_view('all')
519 yield self.assertEqual(len(v), len(self.client.ids))
518 self.assertEqual(len(v), len(self.client.ids))
520 v = self.client[:2]
519 v = self.client[:2]
521 yield self.assertEqual(len(v), 2)
520 self.assertEqual(len(v), 2)
522 v = self.client[:1]
521 v = self.client[:1]
523 yield self.assertEqual(len(v), 1)
522 self.assertEqual(len(v), 1)
524 v = self.client.load_balanced_view()
523 v = self.client.load_balanced_view()
525 yield self.assertEqual(len(v), len(self.client.ids))
524 self.assertEqual(len(v), len(self.client.ids))
526 # parametric tests seem to require manual closing?
525 # parametric tests seem to require manual closing?
527 self.client.close()
526 self.client.close()
528
527
@@ -17,10 +17,10 b' import sys'
17
17
18 from StringIO import StringIO
18 from StringIO import StringIO
19 from subprocess import Popen, PIPE
19 from subprocess import Popen, PIPE
20 import unittest
20
21
21 import nose.tools as nt
22 import nose.tools as nt
22
23
23 from IPython.testing.ipunittest import ParametricTestCase
24 from IPython.utils.io import Tee, capture_output
24 from IPython.utils.io import Tee, capture_output
25 from IPython.utils.py3compat import doctest_refactor_print
25 from IPython.utils.py3compat import doctest_refactor_print
26
26
@@ -38,7 +38,7 b' def test_tee_simple():'
38 nt.assert_equal(chan.getvalue(), text+"\n")
38 nt.assert_equal(chan.getvalue(), text+"\n")
39
39
40
40
41 class TeeTestCase(ParametricTestCase):
41 class TeeTestCase(unittest.TestCase):
42
42
43 def tchan(self, channel, check='close'):
43 def tchan(self, channel, check='close'):
44 trap = StringIO()
44 trap = StringIO()
@@ -61,7 +61,7 b' class TeeTestCase(ParametricTestCase):'
61 def test(self):
61 def test(self):
62 for chan in ['stdout', 'stderr']:
62 for chan in ['stdout', 'stderr']:
63 for check in ['close', 'del']:
63 for check in ['close', 'del']:
64 yield self.tchan(chan, check)
64 self.tchan(chan, check)
65
65
66 def test_io_init():
66 def test_io_init():
67 """Test that io.stdin/out/err exist at startup"""
67 """Test that io.stdin/out/err exist at startup"""
General Comments 0
You need to be logged in to leave comments. Login now