Changeset 25b14be in flex_extract.git for source/pythontest/TestInput.py
- Timestamp:
- Sep 23, 2018, 11:40:28 AM (6 years ago)
- Branches:
- master, ctbto, dev
- Children:
- 4971f63
- Parents:
- 5d42acd
- File:
-
- 1 moved
Legend:
- Unmodified
- Added
- Removed
-
source/pythontest/TestInput.py
r222aa11 r25b14be 2 2 # -*- coding: utf-8 -*- 3 3 4 import unittest5 4 import os 6 5 import sys 6 import pytest 7 7 8 8 sys.path.append('../python') 9 from ControlFile import ControlFile10 import tools9 from classes.ControlFile import ControlFile 10 from mods.tools import get_cmdline_arguments 11 11 12 12 13 class TestInput( unittest.TestCase):13 class TestInput(): 14 14 ''' 15 15 Test class to test the reading of commandline arguments and … … 21 21 # 2. check of parameter 22 22 23 def setUp(self): 24 ''' 25 ''' 23 def __init__(self): 26 24 # Default values for ArgumentParser 27 25 self.args = {'start_date':None, … … 53 51 self.c.check_conditions() 54 52 55 return56 53 57 54 def test_args_reading(self): … … 60 57 '--step=0/to/11/BY/3', '--area=20./20./0./90.'] 61 58 62 arguments = tools.get_c ommandline_arguments()59 arguments = tools.get_cmdline_arguments() 63 60 64 61 args_exp = {'start_date':'20180101', … … 79 76 } 80 77 81 self.assertDictEqual(vars(arguments), args_exp)82 return 78 assert vars(arguments) == args_exp 79 83 80 84 81 def test_args_assignment(self): … … 158 155 159 156 #assert cdict == exp_dict 160 self.assertDictEqual(cdict, exp_dict)157 assert cdict == exp_dict 161 158 162 159 return 163 164 if __name__ == "__main__":165 unittest.main()
Note: See TracChangeset
for help on using the changeset viewer.