File: test_import.py

package info (click to toggle)
pymupdf 1.25.4%2Bds1-3
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 98,632 kB
  • sloc: python: 43,379; ansic: 75; makefile: 6
file content (18 lines) | stat: -rw-r--r-- 482 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
import os
import subprocess
import sys
import textwrap


def test_import():
    root = os.path.abspath(f'{__file__}/../../')
    p = f'{root}/tests/resources_test_import.py'
    with open(p, 'w') as f:
        f.write(textwrap.dedent(
                '''
                from pymupdf.utils import *
                from pymupdf.table import *
                from pymupdf import *
                '''
                ))
    subprocess.run(f'{sys.executable} {p}', shell=1, check=1)