def test_check_path(self): # valid paths are returned unchanged path = os.path.join(self.path_dir, 'my.exe') open(path, 'w').write('my script') os.chmod(path, os.stat(path).st_mode | stat.S_IEXEC) assert check_path(path) == path
def test_check_path_not_existing(home_dir): # the path given must exist with pytest.raises(ValueError): check_path('not-existing-path')