<s> import unittest2 as unittest <EOL> from lib . controllerlib import * <EOL> from lib . controller import * <EOL> import lib . util as util <EOL> import subprocess <EOL> class TestController ( unittest . TestCase ) : <EOL> def test_shell_command ( self ) : <EOL> sc = ShellController ( ) <EOL> actual_out = util . capture_stdout ( sc . _do_default , [ "<STR_LIT>" ] ) <EOL> p = subprocess . Popen ( [ '<STR_LIT>' , '<STR_LIT:-c>' , "<STR_LIT>" ] <EOL> , stdout = subprocess . PIPE <EOL> , stderr = subprocess . PIPE ) <EOL> expected_out , err = p . communicate ( ) <EOL> self . assertEqual ( expected_out . strip ( ) , actual_out . strip ( ) ) <EOL> if __name__ == "<STR_LIT:__main__>" : <EOL> unittest . main ( ) </s>
