details:   http://hg.sympy.org/sympy/rev/cac51147f4f8
changeset: 1774:cac51147f4f8
user:      Ondrej Certik <[EMAIL PROTECTED]>
date:      Wed Oct 08 17:36:02 2008 +0200
description:
test_plotting: don't use classes with tests, just regular functions.

This is the only place in SymPy that uses classes, so let's just use functions
all over the place. This simplifies our own testsuite.

Signed-off-by: Ondrej Certik <[EMAIL PROTECTED]>
Signed-off-by: Riccardo Gori <[EMAIL PROTECTED]>

diffs (106 lines):

diff -r 34f5cebb2828 -r cac51147f4f8 sympy/plotting/tests/test_plotting.py
--- a/sympy/plotting/tests/test_plotting.py     Wed Oct 08 17:36:02 2008 +0200
+++ b/sympy/plotting/tests/test_plotting.py     Wed Oct 08 17:36:02 2008 +0200
@@ -11,60 +11,55 @@
 from sympy import symbols, sin, cos
 x,y = symbols('xy')
 
-class TestPlotting:
-    def __init__(self):
-        global disabled
-        self.disabled = disabled
+def test_import():
+    from sympy import Plot
 
-    def test_import(self):
-        from sympy import Plot
+def test_plot_2d():
+    from sympy import Plot
+    p=Plot(x, [x, -5, 5, 4], visible=False)
+    p.wait_for_calculations()
 
-    def test_plot_2d(self):
-        from sympy import Plot
-        p=Plot(x, [x, -5, 5, 4], visible=False)
-        p.wait_for_calculations()
+def test_plot_2d_discontinuous():
+    from sympy import Plot
+    p=Plot(1/x, [x, -1, 1, 2], visible=False)
+    p.wait_for_calculations()
 
-    def test_plot_2d_discontinuous(self):
-        from sympy import Plot
-        p=Plot(1/x, [x, -1, 1, 2], visible=False)
-        p.wait_for_calculations()
+def test_plot_3d():
+    from sympy import Plot
+    p=Plot(x*y, [x, -5, 5, 5], [y, -5, 5, 5], visible=False)
+    p.wait_for_calculations()
 
-    def test_plot_3d(self):
-        from sympy import Plot
-        p=Plot(x*y, [x, -5, 5, 5], [y, -5, 5, 5], visible=False)
-        p.wait_for_calculations()
+def test_plot_3d_discontinuous():
+    from sympy import Plot
+    p=Plot(1/x, [x, -3, 3, 6], [y, -1, 1, 1], visible=False)
+    p.wait_for_calculations()
 
-    def test_plot_3d_discontinuous(self):
-        from sympy import Plot
-        p=Plot(1/x, [x, -3, 3, 6], [y, -1, 1, 1], visible=False)
-        p.wait_for_calculations()
+def test_plot_2d_polar():
+    from sympy import Plot
+    p=Plot(1/x, [x,-1,1,4], 'mode=polar', visible=False)
+    p.wait_for_calculations()
 
-    def test_plot_2d_polar(self):
-        from sympy import Plot
-        p=Plot(1/x, [x,-1,1,4], 'mode=polar', visible=False)
-        p.wait_for_calculations()
+def test_plot_3d_cylinder():
+    from sympy import Plot
+    p=Plot(1/y, [x,0,6.282,4], [y,-1,1,4], 'mode=polar;style=solid', 
visible=False)
+    p.wait_for_calculations()
 
-    def test_plot_3d_cylinder(self):
-        from sympy import Plot
-        p=Plot(1/y, [x,0,6.282,4], [y,-1,1,4], 'mode=polar;style=solid', 
visible=False)
-        p.wait_for_calculations()
+def test_plot_3d_spherical():
+    from sympy import Plot
+    p=Plot(1, [x,0,6.282,4], [y,0,3.141,4], 'mode=spherical;style=wireframe', 
visible=False)
+    p.wait_for_calculations()
 
-    def test_plot_3d_spherical(self):
-        from sympy import Plot
-        p=Plot(1, [x,0,6.282,4], [y,0,3.141,4], 
'mode=spherical;style=wireframe', visible=False)
-        p.wait_for_calculations()
+def test_plot_2d_parametric():
+    from sympy import Plot
+    p=Plot(sin(x), cos(x), [x, 0, 6.282, 4], visible=False)
+    p.wait_for_calculations()
 
-    def test_plot_2d_parametric(self):
-        from sympy import Plot
-        p=Plot(sin(x), cos(x), [x, 0, 6.282, 4], visible=False)
-        p.wait_for_calculations()
+def test_plot_3d_parametric():
+    from sympy import Plot
+    p=Plot(sin(x), cos(x), x/5.0, [x, 0, 6.282, 4], visible=False)
+    p.wait_for_calculations()
 
-    def test_plot_3d_parametric(self):
-        from sympy import Plot
-        p=Plot(sin(x), cos(x), x/5.0, [x, 0, 6.282, 4], visible=False)
-        p.wait_for_calculations()
-
-    def _test_plot_log(self):
-        from sympy import Plot
-        p=Plot(log(x), [x,0,6.282,4], 'mode=polar', visible=False)
-        p.wait_for_calculations()
+def _test_plot_log():
+    from sympy import Plot
+    p=Plot(log(x), [x,0,6.282,4], 'mode=polar', visible=False)
+    p.wait_for_calculations()

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"sympy-commits" group.
To post to this group, send email to sympy-commits@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/sympy-commits?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to