Hi Edward. That should be okay?
I add the dir argument, and test the outcome. Best Troels 2014-04-30 16:22 GMT+02:00 Edward d'Auvergne <[email protected]>: > Hi Troels, > > Is this commit correct? The commit message and the code change are > not 100% compatible. > > Cheers, > > Edward > > > > On 30 April 2014 15:05, <[email protected]> wrote: >> Author: tlinnet >> Date: Wed Apr 30 15:05:48 2014 >> New Revision: 22891 >> >> URL: http://svn.gna.org/viewcvs/relax?rev=22891&view=rev >> Log: >> Added "dir" as input to the userfunction relax_disp.sherekhan_input in >> systemtest. >> >> bug #21995: (https://gna.org/bugs/index.php?21995) Creating sherekhan input >> files, with data for several fields and different time_T2 >> >> Modified: >> trunk/test_suite/system_tests/relax_disp.py >> >> Modified: trunk/test_suite/system_tests/relax_disp.py >> URL: >> http://svn.gna.org/viewcvs/relax/trunk/test_suite/system_tests/relax_disp.py?rev=22891&r1=22890&r2=22891&view=diff >> ============================================================================== >> --- trunk/test_suite/system_tests/relax_disp.py (original) >> +++ trunk/test_suite/system_tests/relax_disp.py Wed Apr 30 15:05:48 2014 >> @@ -3812,20 +3812,21 @@ >> self.interpreter.relax_disp.cluster(cluster_id='all', >> spin_id=":1-1000") >> >> # Write input >> - self.interpreter.relax_disp.sherekhan_input(force=True, >> spin_id=None) >> + self.interpreter.relax_disp.sherekhan_input(force=True, >> spin_id=None, dir=ds.tmpdir) >> >> # Check the r2eff set files. >> print("\nChecking the R2eff input set files.") >> - files = [[path.join(getcwd(), 'cluster1'), 'sherekhan_frq1.in'], >> [path.join(getcwd(), 'cluster1'), 'sherekhan_frq2.in']] >> + files = [[ds.tmpdir + sep + 'cluster1', 'sherekhan_frq1.in'], [ >> ds.tmpdir + sep + 'cluster1', 'sherekhan_frq2.in']] >> >> # First check file exists >> for dir, file in files: >> + print(dir+sep+file) >> self.assert_(access(dir+sep+file, F_OK)) >> >> # Define how files should look like >> data_set_600 = [ >> "60.8272464287\n", >> - "0.06\n", >> + "0.04\n", >> "# nu_cpmg (Hz) R2eff (rad/s) Error >> \n", >> "# G10\n", >> " 33.333 26.5355607871143 >> 0.523610477116325\n", >> @@ -3919,6 +3920,37 @@ >> for i in range(len(data_set_500)): >> # Make the string test >> self.assertEqual(data_set_500[i], lines[i]) >> + >> + # Test local dir tests. This will be turned off in system test. >> + turn_on_local_dir_test = True >> + >> + if turn_on_local_dir_test: >> + ## Now check to local folder with None argument. >> + # Write input >> + self.interpreter.relax_disp.sherekhan_input(force=True, >> spin_id=None) >> + >> + # Check the r2eff set files. >> + print("\nChecking the R2eff input set files.") >> + files = [[path.join(getcwd(), 'cluster1'), >> 'sherekhan_frq1.in'], [path.join(getcwd(), 'cluster1'), 'sherekhan_frq2.in']] >> + >> + # First check file exists >> + for dir, file in files: >> + print(dir+sep+file) >> + self.assert_(access(dir+sep+file, F_OK)) >> + >> + ## Now check to local folder with dir argument. >> + # Write input >> + set_dir = "Test_ShereKhan" >> + self.interpreter.relax_disp.sherekhan_input(force=True, >> spin_id=None, dir=set_dir) >> + >> + # Check the r2eff set files. >> + print("\nChecking the R2eff input set files.") >> + files = [[path.join(getcwd(), set_dir, 'cluster1'), >> 'sherekhan_frq1.in'], [path.join(getcwd(), set_dir, 'cluster1'), >> 'sherekhan_frq2.in']] >> + >> + # First check file exists >> + for dir, file in files: >> + print(dir+sep+file) >> + self.assert_(access(dir+sep+file, F_OK)) >> >> >> def test_sprangers_data_to_mmq_cr72(self, model=None): >> >> >> _______________________________________________ >> relax (http://www.nmr-relax.com) >> >> This is the relax-commits mailing list >> [email protected] >> >> To unsubscribe from this list, get a password >> reminder, or change your subscription options, >> visit the list information page at >> https://mail.gna.org/listinfo/relax-commits > > _______________________________________________ > relax (http://www.nmr-relax.com) > > This is the relax-devel mailing list > [email protected] > > To unsubscribe from this list, get a password > reminder, or change your subscription options, > visit the list information page at > https://mail.gna.org/listinfo/relax-devel _______________________________________________ relax (http://www.nmr-relax.com) This is the relax-devel mailing list [email protected] To unsubscribe from this list, get a password reminder, or change your subscription options, visit the list information page at https://mail.gna.org/listinfo/relax-devel

