File: __main__.py

package info (click to toggle)
indexed-gzip 1.8.7-3
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 572 kB
  • sloc: ansic: 1,916; python: 1,648; makefile: 13; sh: 12
file content (32 lines) | stat: -rw-r--r-- 696 bytes parent folder | download | duplicates (2)
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
30
31
32
#!/usr/bin/env python
#
# Author: Paul McCarthy <pauldmccarthy@gmail.com>
#
"""
Run indexed_gzip unit tests.  Requires pytest to be installed.


Works around a problem with pytest not discovring/running conftest.py files
when running tests that have been installed into the environment via the
--pyargs option.

https://github.com/pytest-dev/pytest/issues/1596

https://stackoverflow.com/questions/41270604/using-command-line-parameters-with-pytest-pyargs/43747114#43747114
"""


import os.path as op
import            sys


def main():
    import pytest

    testdir = op.abspath(op.dirname(__file__))

    sys.exit(pytest.main([testdir] + sys.argv[1:]))


if __name__ == '__main__':
    main()