source: flex_extract.git/source/pythontest/TestEcFlexpart.py @ c5074d2

devfeature/makefilesorigin/task/language-editingtask/language-editing
Last change on this file since c5074d2 was c5074d2, checked in by Anne Philipp <anne.philipp@…>, 22 months ago

added making of namelist file and jobscript via genshi templates

  • Property mode set to 100644
File size: 1.4 KB
Line 
1#!/usr/bin/env python
2# -*- coding: utf-8 -*-
3
4
5import sys
6import os
7import inspect
8import pytest
9
10sys.path.append('../python')
11import _config
12from classes.EcFlexpart import EcFlexpart
13from classes.ControlFile import ControlFile
14from mods.tools import silent_remove
15
16class TestEcFlexpart():
17    '''
18    '''
19
20    def test_write_namelist(self):
21        import filecmp
22
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)
44
45    def test_retrieve(self):
46        # not sure how to check
47        assert True == True
48
49
50# these functions should test the output and compare the results with an output
51# of the old version and check if there are no differences!!!
52# also check for errors?! Or check if it works for alle datasets and private public etc
53
54    #    - process_output
55    #    - create
56    #    - deacc_fluxes
Note: See TracBrowser for help on using the repository browser.
hosted by ZAMG