Esempio n. 1
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
Esempio n. 2
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
Esempio n. 3
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
Esempio n. 4
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
Esempio n. 5
0
 def test_get_solv_count_top_no_result(self, empty_file, n_top_dc):
     from paratemp.sim_setup import get_solv_count_top
     with pytest.raises(RuntimeError):
         get_solv_count_top(empty_file)
     with pytest.raises(RuntimeError):
         get_solv_count_top(n_top_dc, res_name='Not here')
Esempio n. 6
0
 def test_get_solv_count_top(self, n_top_dc, folder_dc):
     from paratemp.sim_setup import get_solv_count_top
     # Test giving the file name as input
     assert get_solv_count_top(n_top_dc) == 361
     # Test giving only the containing folder as input
     assert get_solv_count_top(folder=folder_dc) == 361
Esempio 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
Esempio 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
Esempio n. 9
0
 def test_get_solv_count_top_no_result(self, empty_file, n_top_dc):
     from paratemp.sim_setup import get_solv_count_top
     with pytest.raises(RuntimeError):
         get_solv_count_top(empty_file)
     with pytest.raises(RuntimeError):
         get_solv_count_top(n_top_dc, res_name='Not here')
Esempio n. 10
0
 def test_get_solv_count_top(self, n_top_dc, folder_dc):
     from paratemp.sim_setup import get_solv_count_top
     # Test giving the file name as input
     assert get_solv_count_top(n_top_dc) == 361
     # Test giving only the containing folder as input
     assert get_solv_count_top(folder=folder_dc) == 361