예제 #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')