示例#1
0
 def testMainArgsParsing(self, mock_system_arch):
     mock_system_arch.return_value = 'dummy'
     getos.main(['--arch'])
     mock_system_arch.assert_called()
示例#2
0
 def testMainNoArgs(self, mock_get_platform):
     mock_get_platform.return_value = 'platform'
     getos.main([])
示例#3
0
 def testMainInvalidArgs(self):
     with self.assertRaises(SystemExit):
         with mock.patch('sys.stderr'):
             getos.main('--foo')
示例#4
0
 def testMainArgsParsing(self, mock_system_arch):
   mock_system_arch.return_value = 'dummy'
   getos.main(['--arch'])
   mock_system_arch.assert_called()
示例#5
0
 def testMainNoArgs(self, mock_get_platform):
   mock_get_platform.return_value = 'platform'
   getos.main([])
示例#6
0
 def testMainInvalidArgs(self):
   with self.assertRaises(SystemExit):
     with mock.patch('sys.stderr'):
       getos.main('--foo')