Skip to content

Commit 9b0a3c9

Browse files
committed
Try and fix an Appveyor permission problem
1 parent cba3ec5 commit 9b0a3c9

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

tests/test_history.py

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -460,8 +460,13 @@ def hist_file():
460460

461461
def test_bad_history_file_path(capsys, request):
462462
with tempfile.TemporaryDirectory() as test_dir:
463+
# For appveyor, create a directory in our temp dir
464+
# for some reason it seems that appveyor won't let us read
465+
# the directory we created
466+
safe_dir = os.path.join(test_dir, 'somedir')
467+
os.mkdir(safe_dir)
463468
# Create a new cmd2 app
464-
cmd2.Cmd(persistent_history_file=test_dir)
469+
cmd2.Cmd(persistent_history_file=safe_dir)
465470
_, err = capsys.readouterr()
466471
assert 'is a directory' in err
467472

0 commit comments

Comments
 (0)