Author: bugman Date: Sat Mar 23 23:26:10 2013 New Revision: 19095 URL: http://svn.gna.org/viewcvs/relax?rev=19095&view=rev Log: Another attempt at fixing the unit tests of the pec module. Added: trunk/test_suite/unit_tests/_lib/_geometry/test_pec.py - copied, changed from r19093, trunk/test_suite/unit_tests/_lib/_linear_algebra/test_pec.py Removed: trunk/test_suite/unit_tests/_lib/_linear_algebra/test_pec.py Modified: trunk/test_suite/unit_tests/_lib/_geometry/__init__.py trunk/test_suite/unit_tests/_lib/_linear_algebra/__init__.py Modified: trunk/test_suite/unit_tests/_lib/_geometry/__init__.py URL: http://svn.gna.org/viewcvs/relax/trunk/test_suite/unit_tests/_lib/_geometry/__init__.py?rev=19095&r1=19094&r2=19095&view=diff ============================================================================== --- trunk/test_suite/unit_tests/_lib/_geometry/__init__.py (original) +++ trunk/test_suite/unit_tests/_lib/_geometry/__init__.py Sat Mar 23 23:26:10 2013 @@ -21,5 +21,8 @@ __all__ = [ - 'lines' + 'test___init_', + 'test_lines', + 'test_pec', + 'test_rotations' ] Copied: trunk/test_suite/unit_tests/_lib/_geometry/test_pec.py (from r19093, trunk/test_suite/unit_tests/_lib/_linear_algebra/test_pec.py) URL: http://svn.gna.org/viewcvs/relax/trunk/test_suite/unit_tests/_lib/_geometry/test_pec.py?p2=trunk/test_suite/unit_tests/_lib/_geometry/test_pec.py&p1=trunk/test_suite/unit_tests/_lib/_linear_algebra/test_pec.py&r1=19093&r2=19095&rev=19095&view=diff ============================================================================== --- trunk/test_suite/unit_tests/_lib/_linear_algebra/test_pec.py (original) +++ trunk/test_suite/unit_tests/_lib/_geometry/test_pec.py Sat Mar 23 23:26:10 2013 @@ -24,11 +24,11 @@ from unittest import TestCase # relax module imports. -from lib.frame_order.pec import pec +from lib.geometry.pec import pec class Test_pseudo_ellipse(TestCase): - """Unit tests for the target_functions.pseudo_ellipse relax module.""" + """Unit tests for the lib.geometry.pec relax module.""" def test_pec_0_0(self): Modified: trunk/test_suite/unit_tests/_lib/_linear_algebra/__init__.py URL: http://svn.gna.org/viewcvs/relax/trunk/test_suite/unit_tests/_lib/_linear_algebra/__init__.py?rev=19095&r1=19094&r2=19095&view=diff ============================================================================== --- trunk/test_suite/unit_tests/_lib/_linear_algebra/__init__.py (original) +++ trunk/test_suite/unit_tests/_lib/_linear_algebra/__init__.py Sat Mar 23 23:26:10 2013 @@ -23,5 +23,4 @@ __all__ = [ 'test___init__', 'test_kronecker_prod' - 'test_pec' ] Removed: trunk/test_suite/unit_tests/_lib/_linear_algebra/test_pec.py URL: http://svn.gna.org/viewcvs/relax/trunk/test_suite/unit_tests/_lib/_linear_algebra/test_pec.py?rev=19094&view=auto ============================================================================== --- trunk/test_suite/unit_tests/_lib/_linear_algebra/test_pec.py (original) +++ trunk/test_suite/unit_tests/_lib/_linear_algebra/test_pec.py (removed) @@ -1,80 +1,0 @@ -############################################################################### -# # -# Copyright (C) 2010-2013 Edward d'Auvergne # -# # -# This file is part of the program relax (http://www.nmr-relax.com). # -# # -# This program is free software: you can redistribute it and/or modify # -# it under the terms of the GNU General Public License as published by # -# the Free Software Foundation, either version 3 of the License, or # -# (at your option) any later version. # -# # -# This program is distributed in the hope that it will be useful, # -# but WITHOUT ANY WARRANTY; without even the implied warranty of # -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # -# GNU General Public License for more details. # -# # -# You should have received a copy of the GNU General Public License # -# along with this program. If not, see <http://www.gnu.org/licenses/>. # -# # -############################################################################### - -# Python module imports. -from math import pi -from unittest import TestCase - -# relax module imports. -from lib.frame_order.pec import pec - - -class Test_pseudo_ellipse(TestCase): - """Unit tests for the target_functions.pseudo_ellipse relax module.""" - - - def test_pec_0_0(self): - """Test the pec() function for x = 0, y = 0 (nothing).""" - - # Check the value. - self.assertAlmostEqual(pec(0, 0), 0.0) - - - def test_pec_0_1(self): - """Test the pec() function for x = 0, y = 1 (nothing).""" - - # Check the value. - self.assertAlmostEqual(pec(0, 1), 0.0) - - - def test_pec_1_0(self): - """Test the pec() function for x = 1, y = 0 (nothing).""" - - # Check the value. - self.assertAlmostEqual(pec(1, 0), 0.0) - - - def test_pec_partial1(self): - """Test the pec() function for x = pi/2, y = pi.""" - - # Check the value. - self.assertAlmostEqual(pec(pi/2, pi), 9.2141334381797524) - - - def test_pec_partial2(self): - """Test the pec() function for x = pi/2, y = pi/2.""" - - # Check the value. - self.assertAlmostEqual(pec(pi/2, pi/2), 2*pi) - - - def test_pec_partial3(self): - """Test the pec() function for x = pi/6, y = pi/2.""" - - # Check the value. - self.assertAlmostEqual(pec(pi/6, pi/2), 2.3058688920532275) - - - def test_pec_pi_pi(self): - """Test the pec() function for x = pi, y = pi (full sphere).""" - - # Check the value. - self.assertAlmostEqual(pec(pi, pi), 4*pi)