Skip to content

Commit 6591ab7

Browse files
tests/test_typing.py: avoid failure when testing fitz alias and with pyodide.
1 parent 0c4b377 commit 6591ab7

1 file changed

Lines changed: 10 additions & 0 deletions

File tree

tests/test_typing.py

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,16 @@ def run(command, check=1):
99
subprocess.run(command, shell=1, check=check)
1010

1111
def test_py_typed():
12+
13+
if os.path.basename(__file__).startswith(f'test_fitz_'):
14+
# Don't test the `fitz` alias, because mypy complains.
15+
print(f'test_py_typed(): Not testing with fitz alias.')
16+
return
17+
18+
if os.environ.get('PYODIDE_ROOT'):
19+
print('test_py_typed(): not running on Pyodide - cannot run child processes.')
20+
return
21+
1222
print(f'test_py_typed(): {pymupdf.__path__=}')
1323
run('pip uninstall -y mypy')
1424
run('pip install mypy')

0 commit comments

Comments
 (0)