<s> import os <EOL> import sys <EOL> from tests . draw_test import TestBase <EOL> import unittest <EOL> from worldengine import __main__ <EOL> from worldengine . cli . main import main <EOL> class TestCLI ( TestBase ) : <EOL> def setUp ( self ) : <EOL> super ( TestCLI , self ) . setUp ( ) <EOL> self . world = "<STR_LIT>" % self . tests_data_dir <EOL> def test__main__ ( self ) : <EOL> assert __main__ <EOL> def test_options ( self ) : <EOL> backup_argv = sys . argv <EOL> sys . argv = [ "<STR_LIT>" , "<STR_LIT>" ] <EOL> self . assertRaises ( SystemExit , main ) <EOL> sys . argv = [ "<STR_LIT>" , "<STR_LIT>" ] <EOL> self . assertRaises ( SystemExit , main ) <EOL> sys . argv = [ "<STR_LIT>" , "<STR_LIT:info>" ] <EOL> self . assertRaises ( SystemExit , main ) <EOL> sys . argv = [ "<STR_LIT>" , "<STR_LIT>" ] <EOL> self . assertRaises ( SystemExit , main ) <EOL> sys . argv = [ "<STR_LIT>" , "<STR_LIT:info>" , "<STR_LIT>" ] <EOL> self . assertRaises ( SystemExit , main ) <EOL> sys . argv = [ "<STR_LIT>" , "<STR_LIT:info>" , "<STR_LIT>" ] <EOL> self . assertRaises ( SystemExit , main ) <EOL> sys . argv = [ "<STR_LIT>" , "<STR_LIT>" , __file__ ] <EOL> self . assertRaises ( Exception , main ) <EOL> sys . argv = [ "<STR_LIT>" , "<STR_LIT:info>" , "<STR_LIT>" , "<STR_LIT>" ] <EOL> self . assertRaises ( SystemExit , main ) <EOL> self . assertTrue ( os . path . isdir ( "<STR_LIT>" ) ) <EOL> sys . argv = [ "<STR_LIT>" , "<STR_LIT>" , "<STR_LIT>" , "<STR_LIT:0>" ] <EOL> self . assertRaises ( SystemExit , main ) <EOL> sys . argv = [ "<STR_LIT>" , "<STR_LIT>" , "<STR_LIT>" , "<STR_LIT>" ] <EOL> self . assertRaises ( SystemExit , main ) <EOL> def test_warnings ( self ) : <EOL> backup_argv = sys . argv <EOL> sys . argv = [ "<STR_LIT>" , "<STR_LIT>" , "<STR_LIT>" , "<STR_LIT>" , "<STR_LIT>" , <EOL> "<STR_LIT>" , "<STR_LIT>" , "<STR_LIT>" , <EOL> "<STR_LIT>" ] <EOL> try : <EOL> main ( ) <EOL> except Exception as e : <EOL> raise e <EOL> def test_smoke_info ( self ) : <EOL> backup_argv = sys . argv <EOL> sys . argv = [ "<STR_LIT>" , "<STR_LIT:info>" , self . world ] <EOL> try : <EOL> main ( ) <EOL> except Exception as e : <EOL> raise e <EOL> sys . argv = backup_argv <EOL> def test_smoke_full ( self ) : <EOL> backup_argv = sys . argv <EOL> sys . argv = [ "<STR_LIT>" , "<STR_LIT>" , "<STR_LIT>" , "<STR_LIT>" , "<STR_LIT>" , <EOL> "<STR_LIT>" , "<STR_LIT>" , "<STR_LIT>" , "<STR_LIT>" , "<STR_LIT>" , <EOL> "<STR_LIT>" , "<STR_LIT>" , <EOL> "<STR_LIT>" , "<STR_LIT>" , "<STR_LIT>" , <EOL> "<STR_LIT>" , "<STR_LIT>" ] <EOL> try : <EOL> main ( ) <EOL> except Exception as e : <EOL> raise e <EOL> def test_smoke_ancient ( self ) : <EOL> backup_argv = sys . argv <EOL> sys . argv = [ "<STR_LIT>" , "<STR_LIT>" , "<STR_LIT>" , self . world ] <EOL> try : <EOL> main ( ) <EOL> except Exception as e : <EOL> raise e <EOL> sys . argv = backup_argv <EOL> def test_smoke_plates ( self ) : <EOL> backup_argv = sys . argv <EOL> sys . argv = [ "<STR_LIT>" , "<STR_LIT>" , "<STR_LIT>" , "<STR_LIT>" , <EOL> "<STR_LIT>" , "<STR_LIT>" , "<STR_LIT>" , "<STR_LIT:2>" ] <EOL> try : <EOL> main ( ) <EOL> except Exception as e : <EOL> raise e <EOL> sys . argv = backup_argv <EOL> if __name__ == '<STR_LIT:__main__>' : <EOL> unittest . main ( ) </s>
