def testMainArgsParsing(self, mock_system_arch): mock_system_arch.return_value = 'dummy' getos.main(['--arch']) mock_system_arch.assert_called()
def testMainNoArgs(self, mock_get_platform): mock_get_platform.return_value = 'platform' getos.main([])
def testMainInvalidArgs(self): with self.assertRaises(SystemExit): with mock.patch('sys.stderr'): getos.main('--foo')