def test_run(self): with patch.object(launch, 'MRJobLauncher') as m_launcher: cmd.main(args=['mrjob', 'run', 'script.py']) m_launcher.assert_called_once_with( args=['script.py'], from_cl=True)
def _test_main_call(self, module, cmd_name): with patch.object(module, 'main') as m_main: cmd.main(args=['mrjob', cmd_name]) m_main.assert_called_once_with([])