Révision 9fd1daa6 tests/test_dos_input.py

b/tests/test_dos_input.py
22 22
    read_input('good.inp')
23 23

  
24 24
    def test_all_good(self):
25
        exp_dict = {'isolated': True,
25
        exp_dict = {'project_name': 'example',
26
                    'isolated': True,
26 27
                    'screening': True,
27 28
                    'refinement': True,
28 29
                    'code': 'cp2k',
29 30
                    'batch_q_sys': 'sge',
31
                    'subm_script': 'cp2k.sub',
30 32
                    'relaunch_err': 'geo_not_conv',
31 33
                    'max_qw': 5,
32 34
                    'special_atoms': [('Fe1', 'Fe'), ('Fe2', 'Fe'),
......
35 37
                    'molec_file': 'acetic.xyz',
36 38
                    'cluster_magns': ['energy', 'moi'],
37 39
                    'num_conformers': 100,
38
                    'num_prom_cand': 5,
39
                    'iso_rmsd': 0.1,
40 40
                    'min_confs': False,
41 41
                    'screen_inp_file': 'screen.inp',
42 42
                    'sites': [128, [135, 138, 141]],
......
44 44
                    'try_disso': True,
45 45
                    'sample_points_per_angle': 4,
46 46
                    'collision_threshold': 0.9,
47
                    'screen_rmsd': 0.1,
48 47
                    'collision_bottom_z': 5.2,
49 48
                    'refine_inp_file': 'refine.inp',
50 49
                    'energy_cutoff': 1.0
51 50
                    }
52 51
        self.assertEqual(read_input('good.inp'), exp_dict)
53 52

  
53
    # TODO add single tests for subm_script and project_name
54

  
54 55
    def test_run_type(self):
55 56
        self.assertEqual(get_run_type(), (True, True, True))
56 57

  
......
83 84
    def test_num_conformers(self):
84 85
        self.assertEqual(get_num_conformers(), 100)
85 86

  
86
    def test_num_prom_cand(self):
87
        self.assertEqual(get_num_prom_cand(), 5)
88

  
89
    def test_iso_rmsd(self):
90
        self.assertEqual(get_iso_rmsd(), 0.1)
91

  
92 87
    def test_min_confs(self):
93 88
        self.assertEqual(get_min_confs(), False)
94 89

  
......
110 105
    def test_coll_thrsld(self):
111 106
        self.assertEqual(get_coll_thrsld(), 0.9)
112 107

  
113
    def test_screen_rmsd(self):
114
        self.assertEqual(get_screen_rmsd(), 0.1)
115

  
116 108
    def test_coll_bottom_z(self):
117 109
        self.assertEqual(get_coll_bottom_z(), 5.2)
118 110

  
......
153 145
    def test_num_conformers(self):
154 146
        self.assertRaises(ValueError, get_num_conformers)
155 147

  
156
    def test_num_prom_cand(self):
157
        self.assertRaises(ValueError, get_num_prom_cand)
158

  
159
    def test_iso_rmsd(self):
160
        self.assertRaises(ValueError, get_iso_rmsd)
161

  
162 148
    def test_min_confs(self):
163 149
        self.assertRaises(ValueError, get_min_confs)
164 150

  
......
180 166
    def test_coll_thrsld(self):
181 167
        self.assertRaises(ValueError, get_coll_thrsld)
182 168

  
183
    def test_screen_rmsd(self):
184
        self.assertRaises(ValueError, get_screen_rmsd)
185

  
186 169
    def test_coll_bottom_z(self):
187 170
        self.assertRaises(ValueError, get_coll_bottom_z)
188 171

  

Formats disponibles : Unified diff