Author: bugman Date: Thu Apr 17 15:38:17 2014 New Revision: 22804 URL: http://svn.gna.org/viewcvs/relax?rev=22804&view=rev Log: Fix for the Test_data.test_count_relax_times_r1rho relaxation dispersion unit test for Python 3.2+. The '%s' representation of floating point numbers is different on these Python versions - the number of decimal places used are different by default. Modified: trunk/test_suite/unit_tests/_specific_analyses/_relax_disp/test_data.py Modified: trunk/test_suite/unit_tests/_specific_analyses/_relax_disp/test_data.py URL: http://svn.gna.org/viewcvs/relax/trunk/test_suite/unit_tests/_specific_analyses/_relax_disp/test_data.py?rev=22804&r1=22803&r2=22804&view=diff ============================================================================== --- trunk/test_suite/unit_tests/_specific_analyses/_relax_disp/test_data.py (original) +++ trunk/test_suite/unit_tests/_specific_analyses/_relax_disp/test_data.py Thu Apr 17 15:38:17 2014 @@ -189,20 +189,20 @@ data['28_10000_46_40'] = ['R1rho', 799777399.1, 241.45862924120914, 1341.11, 0.4] time_comp = { - '118.078_431.0':4, - '118.078_651.2':5, - '118.078_800.5':5, - '118.078_984.0':5, + '118.078_431.00':4, + '118.078_651.20':5, + '118.078_800.50':5, + '118.078_984.00':5, '118.078_1341.11':5, - '118.078_1648.5':5, - '124.247031462_1341.11':5, - '130.416062924_800.5':5, - '130.416062924_1341.11':5, - '130.416062924_1648.5':5, - '142.754125848_800.5':5, - '142.754125848_1341.11':5, - '179.768314621_1341.11':5, - '241.458629241_1341.11':5} + '118.078_1648.50':5, + '124.247_1341.11':5, + '130.416_800.50':5, + '130.416_1341.11':5, + '130.416_1648.50':5, + '142.754_800.50':5, + '142.754_1341.11':5, + '179.768_1341.11':5, + '241.459_1341.11':5} # Check the number of time counts. print("Checking the number of time counts.") @@ -215,7 +215,8 @@ print(id, exp_type, frq, offset, point, count) # Test the time count - self.assertEqual(count, time_comp['%s_%s'%(offset, point)]) + print(time_comp) + self.assertEqual(count, time_comp['%.3f_%.2f'%(offset, point)]) def test_find_intensity_keys_r1rho(self):