2023-07-15 15:16:38 +00:00
|
|
|
from __future__ import annotations
|
|
|
|
|
|
|
|
import sys
|
2024-02-13 02:07:42 +00:00
|
|
|
from subprocess import check_call # noqa: S404
|
2024-04-13 15:55:38 +00:00
|
|
|
from typing import TYPE_CHECKING
|
|
|
|
|
|
|
|
if TYPE_CHECKING:
|
|
|
|
from pytest_console_scripts import ScriptRunner
|
2023-07-15 15:16:38 +00:00
|
|
|
|
|
|
|
|
|
|
|
def test_main() -> None:
|
|
|
|
check_call([sys.executable, "-m", "pipdeptree", "--help"])
|
|
|
|
|
|
|
|
|
2024-04-13 15:55:38 +00:00
|
|
|
def test_console(script_runner: ScriptRunner) -> None:
|
|
|
|
result = script_runner.run("pipdeptree", "--help")
|
|
|
|
assert result.success
|