<s> from __future__ import absolute_import <EOL> import sys <EOL> import click <EOL> import click_config <EOL> import os <EOL> __author__ = '<STR_LIT>' <EOL> sample = lambda f : os . path . join ( os . path . dirname ( __file__ ) , '<STR_LIT>' , f ) <EOL> class Config ( object ) : <EOL> class mysql ( object ) : <EOL> timeout = <NUM_LIT:0.5> <EOL> host = None <EOL> port = None <EOL> database = None <EOL> class logger ( object ) : <EOL> level = '<STR_LIT>' <EOL> @ click . command ( ) <EOL> @ click . option ( '<STR_LIT>' , type = str ) <EOL> @ click_config . wrap ( module = Config , sections = ( '<STR_LIT>' , '<STR_LIT>' ) , watch = False ) <EOL> def main ( log_level ) : <EOL> """<STR_LIT>""" <EOL> assert log_level == '<STR_LIT>' <EOL> assert Config . mysql . host == '<STR_LIT:localhost>' <EOL> assert Config . mysql . port == <NUM_LIT> <EOL> assert Config . mysql . database == '<STR_LIT:test>' <EOL> assert Config . mysql . timeout == <NUM_LIT:0.5> <EOL> def test ( ) : <EOL> os . environ [ '<STR_LIT>' ] = sample ( '<STR_LIT>' ) <EOL> sys . argv = sys . argv [ <NUM_LIT:0> : <NUM_LIT:1> ] + [ '<STR_LIT>' , '<STR_LIT>' , '<STR_LIT>' , sample ( '<STR_LIT>' ) , <EOL> '<STR_LIT>' , '<STR_LIT>' ] <EOL> try : <EOL> main ( ) <EOL> except SystemExit : <EOL> pass <EOL> if __name__ == '<STR_LIT:__main__>' : <EOL> test ( ) </s>
