summaryrefslogtreecommitdiff
path: root/numpy/polynomial/tests/test_classes.py
diff options
context:
space:
mode:
authorCharles Harris <charlesr.harris@gmail.com>2012-01-03 14:02:56 -0700
committerCharles Harris <charlesr.harris@gmail.com>2012-01-09 11:09:38 -0700
commit356537c381ef49db349214b5a8f918c80cd8cb1c (patch)
treee7c23adf90f2c7c86934741b140c98f67ebed297 /numpy/polynomial/tests/test_classes.py
parentb7a5b170ff68fc502e4fbc5055d23a8ed082482a (diff)
downloadnumpy-356537c381ef49db349214b5a8f918c80cd8cb1c.tar.gz
TST: Remove docstring from test_class_methods.
And don't use the 'exec' statement to write the tests.
Diffstat (limited to 'numpy/polynomial/tests/test_classes.py')
-rw-r--r--numpy/polynomial/tests/test_classes.py18
1 files changed, 1 insertions, 17 deletions
diff --git a/numpy/polynomial/tests/test_classes.py b/numpy/polynomial/tests/test_classes.py
index c01342203..fb0d359e0 100644
--- a/numpy/polynomial/tests/test_classes.py
+++ b/numpy/polynomial/tests/test_classes.py
@@ -20,8 +20,7 @@ classes = (
Hermite, HermiteE)
-def check_class_methods():
- """Test all class methods"""
+def test_class_methods():
for Poly1 in classes:
for Poly2 in classes:
yield check_conversion, Poly1, Poly2
@@ -518,21 +517,6 @@ def check_mapparms(Poly) :
p = Poly([1], domain=d, window=w)
assert_almost_equal([1, 2], p.mapparms())
-for test in check_class_methods():
- if len(test) == 3:
- f, a, b = [t.__name__ for t in test]
- prefix = "def %s_%s_%s(): " % (f, a, b)
- prefix = prefix.replace('check', 'test')
- suffix = "%s(%s, %s)" % (f, a, b)
- exec prefix + suffix
- if len(test) == 2:
- f, a = [t.__name__ for t in test]
- prefix = "def %s_%s(): " % (f, a)
- prefix = prefix.replace('check', 'test')
- suffix = "%s(%s)" % (f, a)
- exec prefix + suffix
-
-
if __name__ == "__main__":
run_module_suite()