1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24 from os import F_OK, access, sep
25 import wx
26
27
28 from data import Relax_data_store; ds = Relax_data_store()
29 from generic_fns.mol_res_spin import spin_loop
30 from generic_fns.pipes import cdp_name
31 from status import Status; status = Status()
32 from test_suite.gui_tests.base_classes import GuiTestCase
33
34
35 from gui.misc import int_to_gui, str_to_gui
36 from gui.user_functions import deselect, sequence, spin
37 from gui.wizard import Wiz_window
38
39
41 """Class for testing various aspects specific to saved states."""
42
44 """Test the loading of a relax save state with no GUI data."""
45
46
47 file = status.install_path + sep + 'test_suite' + sep + 'shared_data' + sep + 'model_free' + sep + 'OMP' + sep + 'final_results_trunc_1.3'
48 self.app.gui.state_load(file_name=file)
49
50
51 self.app.gui.show_pipe_editor(None)
52
53
54 self.app.gui.pipe_editor.menu(Fake_grid_cell_right_click())
55
56
57 self.app.gui.pipe_editor.associate_auto(None)
58
59
60 index = 0
61
62
63 self.assert_(not self.app.gui.analysis.init_state)
64 self.assertEqual(self.app.gui.analysis._num_analyses, 1)
65 self.assertEqual(len(self.app.gui.analysis._analyses), 1)
66 self.assertEqual(self.app.gui.analysis.notebook.GetPageCount(), 1)
67 self.assert_(self.app.gui.analysis._analyses[index].init_flag)
68
69
70 self.assert_(hasattr(ds, 'relax_gui'))
71 self.assertEqual(ds.relax_gui.analyses[index].analysis_name, 'Model-free')
72 self.assertEqual(ds.relax_gui.analyses[index].pipe_name, 'a')
73
74
75
77 """Simulate a grid_cell_right_click event ."""
78
80 """Overwrite the GetRow() method."""
81
82
83 return 0
84