Author: bugman Date: Fri Feb 19 19:00:30 2010 New Revision: 10788 URL: http://svn.gna.org/viewcvs/relax?rev=10788&view=rev Log: Fix for the test_bug_12670_12679() system test. The Grace file lines are now not hardcoded!!! Modified: 1.3/test_suite/system_tests/relax_fit.py Modified: 1.3/test_suite/system_tests/relax_fit.py URL: http://svn.gna.org/viewcvs/relax/1.3/test_suite/system_tests/relax_fit.py?rev=10788&r1=10787&r2=10788&view=diff ============================================================================== --- 1.3/test_suite/system_tests/relax_fit.py (original) +++ 1.3/test_suite/system_tests/relax_fit.py Fri Feb 19 19:00:30 2010 @@ -22,6 +22,7 @@ # Python module imports. from os import sep +from re import search from shutil import rmtree from string import split import sys @@ -69,14 +70,19 @@ lines = file.readlines() file.close() - # Split up the lines. + # Loop over all lines. for i in xrange(len(lines)): + # Find the "@target G0.S0" line. + if search('@target', lines[i]): + index = i + 2 + + # Split up the lines. lines[i] = split(lines[i]) # Check some of the Grace data. - self.assertEqual(len(lines[23]), 2) - self.assertEqual(lines[23][0], '0.004') - self.assertEqual(lines[23][1], '487178.0') + self.assertEqual(len(lines[index]), 2) + self.assertEqual(lines[index][0], '0.004') + self.assertEqual(lines[index][1], '487178.0') def test_curve_fitting(self):