File: runtests.py

package info (click to toggle)
python-tld 0.13-3
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 2,008 kB
  • sloc: python: 12,972; sh: 119; makefile: 19
file content (29 lines) | stat: -rwxr-xr-x 451 bytes parent folder | download
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
27
28
29
#!/usr/bin/env python
import os
import sys

import pytest

py_package_dir = "src"

try:
    profile  # noqa
except Exception:
    from functools import wraps

    def profile(func):
        @wraps(func)
        def wrapped(*args, **kwargs):
            return func(*args, **kwargs)

        return wrapped


@profile
def main():
    sys.path.insert(0, os.path.abspath("src"))
    return pytest.main()


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