<s> import unittest <EOL> from biicode . client . shell . biistream import BiiOutputStream <EOL> from biicode . client . command . tool_catalog import ToolCatalog <EOL> from biicode . client . command . biicommand import BiiCommand <EOL> from biicode . client . dev . cpp . cpptoolchain import CPPToolChain <EOL> from StringIO import StringIO <EOL> class ToolCatalogtext ( unittest . TestCase ) : <EOL> def test_help ( self ) : <EOL> mystdout = StringIO ( ) <EOL> out = BiiOutputStream ( stream = mystdout ) <EOL> toolcatalog = ToolCatalog ( BiiCommand , tools = [ CPPToolChain ] ) <EOL> toolcatalog . show_advanced = True <EOL> argv = [ "<STR_LIT:all>" ] <EOL> mystdout . truncate ( <NUM_LIT:0> ) <EOL> toolcatalog . print_help ( out , argv ) <EOL> self . assertIn ( "<STR_LIT>" , str ( mystdout . buflist ) ) <EOL> mystdout . truncate ( <NUM_LIT:0> ) <EOL> argv = None <EOL> toolcatalog . print_help ( out , argv ) <EOL> self . assertNotIn ( "<STR_LIT>" , str ( mystdout . buflist ) ) <EOL> mystdout . truncate ( <NUM_LIT:0> ) <EOL> argv = [ ] <EOL> toolcatalog . print_help ( out , argv ) <EOL> self . assertNotIn ( "<STR_LIT>" , str ( mystdout . buflist ) ) <EOL> mystdout . truncate ( <NUM_LIT:0> ) <EOL> argv = [ "<STR_LIT>" ] <EOL> toolcatalog . print_help ( out , argv ) <EOL> self . assertIn ( "<STR_LIT>" , str ( mystdout . buflist ) ) </s>
