MCPcopy Index your code
hub / github.com/pymupdf/PyMuPDF / venv_info

Function venv_info

scripts/test.py:810–839  ·  view source on GitHub ↗

Returns string containing information about the venv we use and how to run tests manually. If specified, `pytest_args` contains the pytest args, otherwise we use an example.

(pytest_args=None)

Source from the content-addressed store, hash-verified

808 return True
809
810def venv_info(pytest_args=None):
811 '''
812 Returns string containing information about the venv we use and how to
813 run tests manually. If specified, `pytest_args` contains the pytest args,
814 otherwise we use an example.
815 '''
816 pymupdf_dir_rel = gh_release.relpath(pymupdf_dir)
817 ret = f'Name of venv: {gh_release.venv_name}\n'
818 if pytest_args is None:
819 pytest_args = f'{pymupdf_dir_rel}/tests/test_general.py::test_subset_fonts'
820 if platform.system() == 'Windows':
821 ret += textwrap.dedent(f'''
822 Rerun tests manually with rebased implementation:
823 Enter venv:
824 {gh_release.venv_name}\\Scripts\\activate
825 Run specific test in venv:
826 {gh_release.venv_name}\\Scripts\\python -m pytest {pytest_args}
827 ''')
828 else:
829 ret += textwrap.dedent(f'''
830 Rerun tests manually with rebased implementation:
831 Enter venv and run specific test, also under gdb:
832 . {gh_release.venv_name}/bin/activate
833 python -m pytest {pytest_args}
834 gdb --args python -m pytest {pytest_args}
835 Run without explicitly entering venv, also under gdb:
836 ./{gh_release.venv_name}/bin/python -m pytest {pytest_args}
837 gdb --args ./{gh_release.venv_name}/bin/python -m pytest {pytest_args}
838 ''')
839 return ret
840
841
842def build(

Callers 2

show_helpFunction · 0.85
testFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…