File: test_func.py

package info (click to toggle)
subprocess-tee 0.4.2-1.1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 172 kB
  • sloc: python: 266; makefile: 4
file content (22 lines) | stat: -rw-r--r-- 587 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
"""Functional tests for subprocess-tee library."""

import subprocess
import sys

import pytest


@pytest.mark.skipif(
    sys.version_info < (3, 9), reason="molecule test requires python 3.9+"
)
def test_molecule() -> None:
    """Ensures molecule does display output of its subprocesses."""
    result = subprocess.run(
        ["molecule", "test"],
        stdout=subprocess.PIPE,
        stderr=subprocess.PIPE,
        universal_newlines=True,
        check=False,
    )  # type: ignore
    assert result.returncode == 0
    assert "Past glories are poor feeding." in result.stdout