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 -19
View File
@@ -4,7 +4,7 @@ from __future__ import annotations
import sys
import types
from pathlib import Path, PureWindowsPath
from pathlib import Path
import pytest
@@ -72,21 +72,3 @@ def test_a_font_is_found_by_the_family_name_in_its_file(registry, tmp_path, monk
fonts = utilities.get_windows_fonts()
assert fonts == {"MyFont-Bold": user, "My Font": user}
assert utilities.find_font_with_fallbacks("My Font", fonts) == user
def test_an_absolute_registry_value_replaces_the_font_folder():
user = r"C:\Users\x\AppData\Local\Microsoft\Windows\Fonts\MyFont-Bold.ttf"
assert PureWindowsPath(r"C:\Windows\Fonts", user) == PureWindowsPath(user)
def test_missing_files_bitmap_fonts_and_odd_values_are_skipped(registry, tmp_path):
font(tmp_path / "machine/modern.fon")
collection = font(tmp_path / "machine/msgothic.ttc")
registry[HKLM] = [
("Modern (All res)", "modern.fon"),
("MS Gothic & MS UI Gothic (TrueType)", "msgothic.ttc"),
("Gone (TrueType)", "gone.ttf"),
("Binary (TrueType)", b"x.ttf"),
]
registry[HKCU] = [("Deleted (TrueType)", str(tmp_path / "user/Deleted.ttf"))]
assert utilities.get_windows_fonts() == {"MS Gothic & MS UI Gothic": collection}