예제 #1
0
 def testUnix(self):
     self.assertEqual(util.which('/bin/sh'), '/bin/sh')
     self.assertIsNone(util.which('xxx'))
     self.assertIsNotNone(util.which('cat'))
예제 #2
0
 def testUnix(self):
   self.assertEqual(util.which('/bin/sh'), '/bin/sh')
   self.assertIsNone(util.which('xxx'))
   self.assertIsNotNone(util.which('cat'))
예제 #3
0
 def testWindows(self):
     notepad_path = 'C:\\Windows\\System32\\notepad.exe'
     self.assertEqual(util.which(notepad_path), notepad_path)
     self.assertIsNone(util.which('xxx'))
     self.assertIsNotNone(util.which('notepad.exe'))
예제 #4
0
 def testWindows(self):
   notepad_path = 'C:\\Windows\\System32\\notepad.exe'
   self.assertEqual(util.which(notepad_path), notepad_path)
   self.assertIsNone(util.which('xxx'))
   self.assertIsNotNone(util.which('notepad.exe'))