1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25 from os import sep
26 import sys
27
28
29 from data import Relax_data_store; ds = Relax_data_store()
30 from generic_fns.mol_res_spin import residue_loop
31 from physical_constants import N15_CSA
32 from status import Status; status = Status()
33 from test_suite.system_tests.base_classes import SystemTestCase
34
35
36 -class Ct(SystemTestCase):
37 """Class for testing various aspects specific to consistency testing."""
38
39
45
46
48 """The consistency testing calculation test."""
49
50
51 self.script_exec(status.install_path + sep+'test_suite'+sep+'system_tests'+sep+'scripts'+sep+'consistency_tests_calc_test.py')
52
53
54 j0 = [4.0703318681008998e-09, 3.7739393907014834e-09]
55 f_eta = [0.20413244790407614, 0.18898977395296815]
56 f_r2 = [2.0482909381655862e-09, 1.8998154021753067e-09]
57
58
59 index = 0
60 for res in residue_loop():
61
62 if res.num == -2 or res.num == -1:
63 self.assert_(res.spin[0].select)
64 self.assertAlmostEqual(res.spin[0].j0, j0[index])
65 self.assertAlmostEqual(res.spin[0].f_eta, f_eta[index])
66 self.assertAlmostEqual(res.spin[0].f_r2, f_r2[index])
67 index = index + 1
68
69
70 else:
71 self.assert_(not res.spin[0].select)
72
73
75 """The user function value.set()."""
76
77
78 self.script_exec(status.install_path + sep+'test_suite'+sep+'system_tests'+sep+'scripts'+sep+'consistency_tests_set_value.py')
79
80
81 for res in residue_loop():
82 self.assertAlmostEqual(res.spin[0].csa, N15_CSA)
83
84
86 """Test a complete consistency tests run using a script."""
87
88
89 self.script_exec(status.install_path + sep+'test_suite'+sep+'system_tests'+sep+'scripts'+sep+'consistency_tests.py')
90