Changeset 25b14be in flex_extract.git for source/pythontest/TestInput.py


Ignore:
Timestamp:
Sep 23, 2018, 11:40:28 AM (6 years ago)
Author:
Anne Philipp <anne.philipp@…>
Branches:
master, ctbto, dev
Children:
4971f63
Parents:
5d42acd
Message:

changed whole tree structure of flex_extract to have better overview

File:
1 moved

Legend:

Unmodified
Added
Removed
  • source/pythontest/TestInput.py

    r222aa11 r25b14be  
    22# -*- coding: utf-8 -*-
    33
    4 import unittest
    54import os
    65import sys
     6import pytest
    77
    88sys.path.append('../python')
    9 from ControlFile import ControlFile
    10 import tools
     9from classes.ControlFile import ControlFile
     10from mods.tools import get_cmdline_arguments
    1111
    1212
    13 class TestInput(unittest.TestCase):
     13class TestInput():
    1414    '''
    1515    Test class to test the reading of commandline arguments and
     
    2121    # 2. check of parameter
    2222
    23     def setUp(self):
    24         '''
    25         '''
     23    def __init__(self):
    2624        # Default values for ArgumentParser
    2725        self.args = {'start_date':None,
     
    5351        self.c.check_conditions()
    5452
    55         return
    5653
    5754    def test_args_reading(self):
     
    6057                    '--step=0/to/11/BY/3', '--area=20./20./0./90.']
    6158
    62         arguments = tools.get_commandline_arguments()
     59        arguments = tools.get_cmdline_arguments()
    6360
    6461        args_exp = {'start_date':'20180101',
     
    7976                    }
    8077
    81         self.assertDictEqual(vars(arguments), args_exp)
    82         return
     78        assert vars(arguments) == args_exp
     79
    8380
    8481    def test_args_assignment(self):
     
    158155
    159156        #assert cdict == exp_dict
    160         self.assertDictEqual(cdict, exp_dict)
     157        assert cdict == exp_dict
    161158
    162159        return
    163 
    164 if __name__ == "__main__":
    165     unittest.main()
Note: See TracChangeset for help on using the changeset viewer.
hosted by ZAMG