test: delete slow, timing-based and redundant tests

This commit is contained in:
imSp4rky
2026-12-05 15:20:05 -07:00
parent 783a2fc185
commit 3a0a74e694
292 changed files with 153 additions and 15174 deletions
+1 -15
View File
@@ -6,25 +6,11 @@ import io
import sys
import pytest
from click.testing import CliRunner
from unshackle.core import __version__
from unshackle.core.__main__ import main, print_banner
from unshackle.core.config import config
from unshackle.core.__main__ import print_banner
from unshackle.core.console import force_utf8_streams
@pytest.mark.parametrize("args", [["--help"], ["env", "--help"]])
def test_help_prints_the_banner_once(monkeypatch: pytest.MonkeyPatch, args: list[str]) -> None:
monkeypatch.setattr(config, "update_checks", False)
result = CliRunner().invoke(main, args)
assert result.exit_code == 0, result.output
assert result.output.count(f"v {__version__}") == 1
assert "Usage:" in result.output
def test_banner_prints_to_a_legacy_code_page_stream(monkeypatch: pytest.MonkeyPatch) -> None:
buffer = io.BytesIO()
monkeypatch.setattr(sys, "stdout", io.TextIOWrapper(buffer, encoding="cp1252"))