<s> from __future__ import division <EOL> from pyqi . commands . make_optparse import MakeOptparse <EOL> from pyqi . core . command import CommandIn , ParameterCollection <EOL> from unittest import TestCase , main <EOL> __credits__ = [ "<STR_LIT>" , "<STR_LIT>" , "<STR_LIT>" , <EOL> "<STR_LIT>" ] <EOL> class MakeOptparseTests ( TestCase ) : <EOL> def setUp ( self ) : <EOL> self . cmd = MakeOptparse ( ) <EOL> def test_run ( self ) : <EOL> exp = win_text <EOL> pc = CommandIn ( Name = '<STR_LIT>' , Required = True , DataType = str , Description = "<STR_LIT>" ) <EOL> bool_param = CommandIn ( Name = '<STR_LIT>' , DataType = bool , <EOL> Description = '<STR_LIT>' , Required = False ) <EOL> class stubby : <EOL> CommandIns = ParameterCollection ( [ pc , bool_param ] ) <EOL> CommandOuts = ParameterCollection ( [ ] ) <EOL> obs = self . cmd ( ** { '<STR_LIT>' : '<STR_LIT>' , <EOL> '<STR_LIT>' : stubby ( ) , <EOL> '<STR_LIT>' : '<STR_LIT>' , <EOL> '<STR_LIT:email>' : '<STR_LIT>' , <EOL> '<STR_LIT>' : '<STR_LIT>' , <EOL> '<STR_LIT>' : '<STR_LIT>' , <EOL> '<STR_LIT:version>' : '<STR_LIT:1.0>' <EOL> } ) <EOL> self . assertEqual ( obs [ '<STR_LIT:result>' ] , exp . splitlines ( ) ) <EOL> win_text = """<STR_LIT>""" <EOL> if __name__ == '<STR_LIT:__main__>' : <EOL> main ( ) </s>
