Trees | Indices | Help |
|
---|
|
1 ############################################################################### 2 # # 3 # Copyright (C) 2010 Edward d'Auvergne # 4 # # 5 # This file is part of the program relax. # 6 # # 7 # relax is free software; you can redistribute it and/or modify # 8 # it under the terms of the GNU General Public License as published by # 9 # the Free Software Foundation; either version 2 of the License, or # 10 # (at your option) any later version. # 11 # # 12 # relax is distributed in the hope that it will be useful, # 13 # but WITHOUT ANY WARRANTY; without even the implied warranty of # 14 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # 15 # GNU General Public License for more details. # 16 # # 17 # You should have received a copy of the GNU General Public License # 18 # along with relax; if not, write to the Free Software # 19 # Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA # 20 # # 21 ############################################################################### 22 23 # Python module imports. 24 from math import pi 25 from unittest import TestCase 26 27 # relax module imports. 28 from maths_fns.pseudo_ellipse import pec 29 3032 """Unit tests for the maths_fns.pseudo_ellipse relax module.""" 33 348236 """Test the pec() function for x = 0, y = 0 (nothing).""" 37 38 # Check the value. 39 self.assertAlmostEqual(pec(0, 0), 0.0)40 4143 """Test the pec() function for x = 0, y = 1 (nothing).""" 44 45 # Check the value. 46 self.assertAlmostEqual(pec(0, 1), 0.0)47 4850 """Test the pec() function for x = 1, y = 0 (nothing).""" 51 52 # Check the value. 53 self.assertAlmostEqual(pec(1, 0), 0.0)54 5557 """Test the pec() function for x = pi/2, y = pi.""" 58 59 # Check the value. 60 self.assertAlmostEqual(pec(pi/2, pi), 9.2141334381797524)61 6264 """Test the pec() function for x = pi/2, y = pi/2.""" 65 66 # Check the value. 67 self.assertAlmostEqual(pec(pi/2, pi/2), 2*pi)68 6971 """Test the pec() function for x = pi/6, y = pi/2.""" 72 73 # Check the value. 74 self.assertAlmostEqual(pec(pi/6, pi/2), 2.3058688920532275)75 7678 """Test the pec() function for x = pi, y = pi (full sphere).""" 79 80 # Check the value. 81 self.assertAlmostEqual(pec(pi, pi), 4*pi)
Trees | Indices | Help |
|
---|
Generated by Epydoc 3.0.1 on Wed Apr 10 13:32:54 2013 | http://epydoc.sourceforge.net |