run_pytest.py 598 Bytes
Newer Older
mashun1's avatar
mashun1 committed
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
#!/usr/bin/env python
"""Script to run pytest tests for the lettucedetect package."""

import sys

import pytest


def run_tests():
    """Run pytest tests for the lettucedetect package."""
    # Run pytest with specified arguments
    args = [
        "-v",  # verbose output
        "--tb=short",  # shorter traceback format
        "tests/test_inference_pytest.py",  # only run inference tests
    ]

    # Add any command line arguments
    args.extend(sys.argv[1:])

    # Run pytest and return the exit code
    return pytest.main(args)


if __name__ == "__main__":
    sys.exit(run_tests())