Skip to content

Commit 3d67ee2

Browse files
committed
skip perm test for root
1 parent f218cfd commit 3d67ee2

1 file changed

Lines changed: 5 additions & 3 deletions

File tree

tests/test_libzim_creator.py

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
import base64
44
import datetime
55
import itertools
6+
import os
67
import pathlib
78
import subprocess
89
import sys
@@ -774,9 +775,10 @@ def get_contentprovider(self):
774775

775776

776777
def test_creator_badfilename(tmpdir):
777-
# lack of perm
778-
with pytest.raises(IOError):
779-
Creator("/root/test.zim")
778+
if os.getuid() != 0:
779+
# lack of perm
780+
with pytest.raises(IOError):
781+
Creator("/root/test.zim")
780782

781783
# forward slash points to non-existing folder
782784
with pytest.raises(IOError):

0 commit comments

Comments
 (0)