File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 11#!/usr/bin/env python
2+ from __future__ import annotations
23
34import base64
45import datetime
56import itertools
67import os
78import pathlib
9+ import platform
810import subprocess
911import sys
10- from typing import Dict
11-
12- import pytest
1312
1413import libzim .writer
14+ import pytest
1515from libzim .reader import Archive
1616from libzim .search import Query , Searcher
1717from libzim .suggestion import SuggestionSearcher
@@ -49,7 +49,7 @@ def get_contentprovider(self) -> libzim.writer.ContentProvider:
4949 return FileProvider (filepath = self .filepath )
5050 return StringProvider (content = getattr (self , "content" , "" ))
5151
52- def get_hints (self ) -> Dict [Hint , int ]:
52+ def get_hints (self ) -> dict [Hint , int ]:
5353 return getattr (self , "hints" , {Hint .FRONT_ARTICLE : True })
5454
5555
@@ -805,7 +805,7 @@ def get_contentprovider(self):
805805
806806
807807def test_creator_badfilename (tmpdir ):
808- if os .getuid () != 0 :
808+ if platform . system () != "Windows" and os .getuid () != 0 :
809809 # lack of perm
810810 with pytest .raises (IOError ):
811811 Creator ("/root/test.zim" )
You can’t perform that action at this time.
0 commit comments