Changeset 222aa11 in flex_extract.git for python/pythontest
- Timestamp:
- Sep 10, 2018, 8:54:42 AM (6 years ago)
- Branches:
- master, ctbto, dev
- Children:
- 3232589
- Parents:
- 308e144
- Location:
- python/pythontest
- Files:
-
- 1 added
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
python/pythontest/.cache/v/cache/lastfailed
r308e144 r222aa11 1 1 { 2 "TestTools.py::TestTools::()": true,3 "TestTools.py::TestTools::()::test_failany_silent_remove": true,4 2 "TestTools.py::TestTools::test_init128": true, 5 3 "TestTools.py::TestTools::test_to_param_id": true -
python/pythontest/TestInput.py
r067a0c3 r222aa11 5 5 import os 6 6 import sys 7 7 8 sys.path.append('../python') 8 9 from ControlFile import ControlFile -
python/pythontest/TestPathes.py
rdda0e9d r222aa11 9 9 import _config 10 10 11 def test_path_localpython(): 12 assert os.path.exists(_config.PATH_LOCAL_PYTHON) == 1 13 14 def test_path_flexextract(): 15 assert os.path.exists(_config.PATH_FLEXEXTRACT_DIR) == 1 16 17 def test_path_flexextract_name(): 18 version = _config._VERSION_STR 19 flexextract_name = 'flex_extract_v' + version 20 assert os.path.basename(_config.PATH_FLEXEXTRACT_DIR) == flexextract_name 21 22 def test_path_templates(): 23 assert os.path.exists(_config.PATH_TEMPLATES) == 1 11 24 12 25 def test_path_vtable(): … … 16 29 assert os.path.isfile(_config.PATH_GRIBTABLE) == 1 17 30 31 def test_path_run(): 32 assert os.path.exists(_config.PATH_RUN_DIR) == 1 33 34 def test_path_control(): 35 assert os.path.exists(_config.PATH_CONTROLFILES) == 1 -
python/pythontest/TestTools.py
r308e144 r222aa11 24 24 25 25 def test_get_cmdline_arguments(self): 26 '''27 '''28 26 cmd_dict_control = {'start_date':'20180101', 29 27 'end_date':'20180101', … … 64 62 65 63 def test_init128(self): 66 '''67 '''68 64 table128 = init128(_config.PATH_GRIBTABLE) 69 65 expected = {'078': 'TCLW', '130': 'T', '034': 'SST'} … … 73 69 74 70 def test_to_param_id(self): 75 '''76 '''77 71 table128 = init128(_config.PATH_GRIBTABLE) 78 72 pars = to_param_id("T/SP/LSP/SSHF", table128) … … 81 75 82 76 def test_my_error(self): 83 '''84 '''85 77 with pytest.raises(SystemExit) as pytest_wrapped_e: 86 78 my_error(['${USER}', 'anne.philipp@univie.ac.at'], 'Failed!') … … 89 81 90 82 def test_read_ecenv(self): 91 '''92 '''93 83 envs_ref = {'ECUID': 'km4a', 94 84 'ECGID': 'at', … … 101 91 102 92 def test_clean_up(self): 93 103 94 assert True 104 95 … … 123 114 assert os.path.isfile(testfile) == False 124 115 assert out == '' 125 #126 # def test_failany_silent_remove(self):127 # testfile = 'testfileany.test'128 # with pytest.raises(OSError) as pytest_wrapped_e:129 # silent_remove(testfile)130 # #out, err = capfd.readouterr()131 # #assert os.path.isfile(testfile) == False132 # #assert out == ''133 116 134 def test_get_list_as_string(self): 135 assert True 117 @pytest.mark.skip(reason="no way of currently testing this") 118 def test_failany_silent_remove(self): 119 testfile = 'testfileany.test' 120 with pytest.raises(OSError) as pytest_wrapped_e: 121 silent_remove(testfile) 122 #out, err = capfd.readouterr() 123 #assert os.path.isfile(testfile) == False 124 #assert out == '' 125 126 def test_success_get_list_as_string(self): 127 list_object = [1, 2, 3, '...', 'testlist'] 128 list_as_string = '1, 2, 3, ..., testlist' 129 assert list_as_string == get_list_as_string(list_object) 130 131 @pytest.mark.skip(reason="no way of currently testing this") 132 def test_fail_get_list_as_string(self): 133 list_object = [1, 2, 3, '...', 'testlist'] 134 list_as_string = '1, 2, 3, ..., testlist' 135 with pytest.raises(Exception) as pytest_wrapped_e: 136 result = get_list_as_string(list_object) 137 assert result == list_as_string 136 138 137 139 def test_warningexist_make_dir(self, capfd):
Note: See TracChangeset
for help on using the changeset viewer.