Ejemplo n.º 1
0
 def test_set_solv_count_fail(self, empty_file, n_top_dc):
     from paratemp.sim_setup import set_solv_count_top
     # These are coming from get_solv_count_top actually, but still the
     # same error
     with pytest.raises(RuntimeError, match='Did not find a line with the '
                                            'solvent count in '):
         set_solv_count_top(empty_file)
     with pytest.raises(RuntimeError):
         set_solv_count_top(n_top_dc, res_name='Not here')
Ejemplo n.º 2
0
 def test_set_solv_count_fail(self, empty_file, n_top_dc):
     from paratemp.sim_setup import set_solv_count_top
     # These are coming from get_solv_count_top actually, but still the
     # same error
     with pytest.raises(RuntimeError, match='Did not find a line with the '
                                            'solvent count in '):
         set_solv_count_top(empty_file)
     with pytest.raises(RuntimeError):
         set_solv_count_top(n_top_dc, res_name='Not here')
Ejemplo n.º 3
0
 def test_set_solv_count_top_no_change(self, folder_dc, n_top_dc, capsys):
     from paratemp.sim_setup import set_solv_count_top, \
         get_solv_count_top
     set_solv_count_top(folder=folder_dc, s_count=361)
     captured = capsys.readouterr()
     assert captured.out == ('Solvent count in '
                             '{} already set at 361'.format(
                                 os.path.relpath(n_top_dc)) +
                             '\nNot copying or changing file.\n')
     assert get_solv_count_top(n_top_dc) == 361
Ejemplo n.º 4
0
 def test_set_solv_count_top_no_change(self, folder_dc, n_top_dc, capsys):
     from paratemp.sim_setup import set_solv_count_top, \
         get_solv_count_top
     set_solv_count_top(folder=folder_dc, s_count=361)
     captured = capsys.readouterr()
     assert captured.out == ('Solvent count in '
                             '{} already set at 361'.format(
                                 os.path.relpath(n_top_dc)) +
                             '\nNot copying or changing file.\n')
     assert get_solv_count_top(n_top_dc) == 361
Ejemplo n.º 5
0
 def test_set_solv_count_top_folder(self, folder_dc, n_top_dc):
     from paratemp.sim_setup import set_solv_count_top, get_solv_count_top
     set_solv_count_top(folder=folder_dc, s_count=50)
     assert get_solv_count_top(n_top_dc) == 50
Ejemplo n.º 6
0
 def test_set_solv_count_top_n(self, n_top_dc):
     from paratemp.sim_setup import set_solv_count_top, get_solv_count_top
     set_solv_count_top(n_top_dc, s_count=100)
     assert get_solv_count_top(n_top_dc) == 100
Ejemplo n.º 7
0
 def test_set_solv_count_top_folder(self, folder_dc, n_top_dc):
     from paratemp.sim_setup import set_solv_count_top, get_solv_count_top
     set_solv_count_top(folder=folder_dc, s_count=50)
     assert get_solv_count_top(n_top_dc) == 50
Ejemplo n.º 8
0
 def test_set_solv_count_top_n(self, n_top_dc):
     from paratemp.sim_setup import set_solv_count_top, get_solv_count_top
     set_solv_count_top(n_top_dc, s_count=100)
     assert get_solv_count_top(n_top_dc) == 100