示例#1
0
 def test_fails_for_non_resolvable_relative_path(self):
     with self.assertRaises(ValueError):
         get_exe_path('../not/a/path')
示例#2
0
 def test_fails_for_non_existent_absolute_path(self):
     with self.assertRaises(ValueError):
         get_exe_path('/not/an/existent/absolute/path')
示例#3
0
 def test_can_lookup_via_PATH(self):
     p = get_exe_path(pathlib.Path(sys.executable).name)
     self.assertTrue(p.is_absolute())
示例#4
0
 def test_takes_relative_and_returns_absolute(self):
     p = get_exe_path(os.path.relpath(sys.executable))
     self.assertTrue(p.is_absolute())
示例#5
0
 def test_takes_absolute_path(self):
     p = get_exe_path(os.path.abspath(sys.executable))
     self.assertTrue(p.is_absolute())
示例#6
0
 def exe(self, value):
     self._exe = get_exe_path(value)