byslib-python

This documentation is automatically generated by online-judge-tools/verification-helper modified by bayashi_cl

View the Project on GitHub bayashi-cl/byslib-python

:warning: tests/verify_pytest/exec_pytest.py

Code

import subprocess
import sys


def exec_pytest(file: str) -> int:
    args = ["pytest", file, "--import-mode=importlib"]
    try:
        subprocess.run(args, text=True, check=True, stdout=sys.stderr)
    except subprocess.CalledProcessError as e:
        print(e, file=sys.stderr)
        return 1
    else:
        print("Hello World")
        return 0
Traceback (most recent call last):
  File "/opt/hostedtoolcache/Python/3.10.4/x64/lib/python3.10/site-packages/onlinejudge_verify/documentation/build.py", line 71, in _render_source_code_stat
    bundled_code = language.bundle(stat.path, basedir=basedir, options={'include_paths': [basedir], 'release': True}).decode()
  File "/opt/hostedtoolcache/Python/3.10.4/x64/lib/python3.10/site-packages/onlinejudge_verify/languages/python.py", line 80, in bundle
    raise NotImplementedError
NotImplementedError
Back to top page