From e380e1da2d5721550bc41c1e1f2953a6698295c7 2013-09-03 17:13:49 From: Thomas Kluyver Date: 2013-09-03 17:13:49 Subject: [PATCH] Remove most uses of ParametricTestCase --- diff --git a/IPython/parallel/tests/test_magics.py b/IPython/parallel/tests/test_magics.py index 102e40c..4756bae 100644 --- a/IPython/parallel/tests/test_magics.py +++ b/IPython/parallel/tests/test_magics.py @@ -24,7 +24,6 @@ import zmq from nose import SkipTest from IPython.testing import decorators as dec -from IPython.testing.ipunittest import ParametricTestCase from IPython.utils.io import capture_output from IPython import parallel as pmod @@ -39,7 +38,7 @@ from .clienttest import ClusterTestCase, generate_output def setup(): add_engines(3, total=True) -class TestParallelMagics(ClusterTestCase, ParametricTestCase): +class TestParallelMagics(ClusterTestCase): def test_px_blocking(self): ip = get_ipython() diff --git a/IPython/parallel/tests/test_view.py b/IPython/parallel/tests/test_view.py index 40b0353..22ace3f 100644 --- a/IPython/parallel/tests/test_view.py +++ b/IPython/parallel/tests/test_view.py @@ -29,7 +29,6 @@ from nose import SkipTest from nose.plugins.attrib import attr from IPython.testing import decorators as dec -from IPython.testing.ipunittest import ParametricTestCase from IPython.utils.io import capture_output from IPython import parallel as pmod @@ -47,7 +46,7 @@ def setup(): point = namedtuple("point", "x y") -class TestView(ClusterTestCase, ParametricTestCase): +class TestView(ClusterTestCase): def setUp(self): # On Win XP, wait for resource cleanup, else parallel test group fails @@ -512,17 +511,17 @@ class TestView(ClusterTestCase, ParametricTestCase): def test_len(self): """len(view) makes sense""" e0 = self.client[self.client.ids[0]] - yield self.assertEqual(len(e0), 1) + self.assertEqual(len(e0), 1) v = self.client[:] - yield self.assertEqual(len(v), len(self.client.ids)) + self.assertEqual(len(v), len(self.client.ids)) v = self.client.direct_view('all') - yield self.assertEqual(len(v), len(self.client.ids)) + self.assertEqual(len(v), len(self.client.ids)) v = self.client[:2] - yield self.assertEqual(len(v), 2) + self.assertEqual(len(v), 2) v = self.client[:1] - yield self.assertEqual(len(v), 1) + self.assertEqual(len(v), 1) v = self.client.load_balanced_view() - yield self.assertEqual(len(v), len(self.client.ids)) + self.assertEqual(len(v), len(self.client.ids)) # parametric tests seem to require manual closing? self.client.close() diff --git a/IPython/utils/tests/test_io.py b/IPython/utils/tests/test_io.py index 221fdb4..2ece068 100644 --- a/IPython/utils/tests/test_io.py +++ b/IPython/utils/tests/test_io.py @@ -17,10 +17,10 @@ import sys from StringIO import StringIO from subprocess import Popen, PIPE +import unittest import nose.tools as nt -from IPython.testing.ipunittest import ParametricTestCase from IPython.utils.io import Tee, capture_output from IPython.utils.py3compat import doctest_refactor_print @@ -38,7 +38,7 @@ def test_tee_simple(): nt.assert_equal(chan.getvalue(), text+"\n") -class TeeTestCase(ParametricTestCase): +class TeeTestCase(unittest.TestCase): def tchan(self, channel, check='close'): trap = StringIO() @@ -61,7 +61,7 @@ class TeeTestCase(ParametricTestCase): def test(self): for chan in ['stdout', 'stderr']: for check in ['close', 'del']: - yield self.tchan(chan, check) + self.tchan(chan, check) def test_io_init(): """Test that io.stdin/out/err exist at startup"""