Author: bugman Date: Wed Aug 21 16:18:17 2013 New Revision: 20668 URL: http://svn.gna.org/viewcvs/relax?rev=20668&view=rev Log: Created the Chemical_shift.test_read_nmrview system test. This, if not obvious from the name, is for checking the reading of chemical shifts from an NMRView peak list. Modified: trunk/test_suite/system_tests/chemical_shift.py Modified: trunk/test_suite/system_tests/chemical_shift.py URL: http://svn.gna.org/viewcvs/relax/trunk/test_suite/system_tests/chemical_shift.py?rev=20668&r1=20667&r2=20668&view=diff ============================================================================== --- trunk/test_suite/system_tests/chemical_shift.py (original) +++ trunk/test_suite/system_tests/chemical_shift.py Wed Aug 21 16:18:17 2013 @@ -41,6 +41,29 @@ # Create the data pipe. self.interpreter.pipe.create('cs', 'mf') + + + def test_read_nmrview(self): + """Test the reading of chemical shifts from an NMRView peak list.""" + + # Create the sequence data, and name the spins. + self.interpreter.spin.create(res_num=70, spin_name='N') + self.interpreter.spin.create(res_num=70, spin_name='HN') + self.interpreter.spin.create(res_num=72, spin_name='N') + self.interpreter.spin.create(res_num=72, spin_name='HN') + + # Read the peak list. + self.interpreter.chemical_shift.read(file="cNTnC.xpk", dir=status.install_path + sep+'test_suite'+sep+'shared_data'+sep+'peak_lists') + + # Test the data. + cs = [116.37241, 10.75274, 126.41302, 9.67752] + i = 0 + for spin in spin_loop(): + # Check the shift. + self.assertEqual(spin.chemical_shift, cs[i]) + + # Increment the index. + i += 1 def test_read_sparky(self):