File: px_integration_test.py

package info (click to toggle)
px 3.6.9-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 5,172 kB
  • sloc: python: 6,445; sh: 205; makefile: 4
file content (25 lines) | stat: -rw-r--r-- 596 bytes parent folder | download | duplicates (3)
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
import os
import sys

from px import px


def test_run_on_pid(capfd):
    """
    Just run px on a PID.

    The only verification done here is that it doesn't crash,
    there is room for improvement...
    """
    argv = [
        sys.argv[0],
        "--no-pager",  # Paging causes problems on Travis CI
        # Note that px hides our own PID by design, so we look for our
        # parent PID in this test.
        str(os.getppid()),
    ]

    # Enable manual inspection of the output:
    # https://docs.pytest.org/en/latest/capture.html
    with capfd.disabled():
        px._main(argv)