File: test_dunder_main.py

package info (click to toggle)
python-uiprotect 6.1.0-2.1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 2,848 kB
  • sloc: python: 16,451; makefile: 21
file content (13 lines) | stat: -rw-r--r-- 347 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
import subprocess
import sys


def test_can_run_as_python_module():
    """Run the CLI as a Python module."""
    result = subprocess.run(
        [sys.executable, "-m", "uiprotect", "--help"],  # S603,S607
        check=True,
        capture_output=True,
    )
    assert result.returncode == 0
    assert b"uiprotect [OPTIONS]" in result.stdout