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)
| 808 | return True |
| 809 | |
| 810 | def 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 | |
| 842 | def build( |