Changeset c5074d2 in flex_extract.git for source/pythontest/TestEcFlexpart.py
- Timestamp:
- Oct 9, 2018, 8:42:16 PM (6 years ago)
- Branches:
- master, ctbto, dev
- Children:
- aa275fc
- Parents:
- 0a06607
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
source/pythontest/TestEcFlexpart.py
r25b14be rc5074d2 4 4 5 5 import sys 6 import os 7 import inspect 6 8 import pytest 7 9 8 10 sys.path.append('../python') 11 import _config 9 12 from classes.EcFlexpart import EcFlexpart 13 from classes.ControlFile import ControlFile 14 from mods.tools import silent_remove 10 15 11 16 class TestEcFlexpart(): … … 13 18 ''' 14 19 15 def test_init(self): 16 # create an instance of EcFlexpart and get a dictionary of the 17 # class attributes, compare this dict with an expected dict! 18 assert True == True 20 def test_write_namelist(self): 21 import filecmp 19 22 20 def test_write_namelist(self): 21 # simple 22 assert True == True 23 control_file = os.path.join(_config.PATH_TEST_DIR, 24 'TestData', 25 'CONTROL.temp') 26 c = ControlFile(control_file) 27 flexpart = EcFlexpart(c) 28 29 c.inputdir = 'TestData' 30 31 # comparison file 32 testfile = os.path.join(_config.PATH_TEST_DIR, 33 'TestData', 34 'convert.nl.test') 35 36 # create 37 flexpart.write_namelist(c) 38 39 finalfile = os.path.join(c.inputdir, _config.FILE_NAMELIST) 40 assert filecmp.cmp(testfile, finalfile, shallow=False) 41 42 # delete test file 43 silent_remove(finalfile) 23 44 24 45 def test_retrieve(self):
Note: See TracChangeset
for help on using the changeset viewer.