예제 #1
0
 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
예제 #2
0
 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
예제 #3
0
def test_check_path_not_existing(home_dir):
    # the path given must exist
    with pytest.raises(ValueError):
        check_path('not-existing-path')
예제 #4
0
def test_check_path_not_existing(home_dir):
    # the path given must exist
    with pytest.raises(ValueError):
        check_path('not-existing-path')