forked from kenzuya/unshackle
test: delete slow, timing-based and redundant tests
This commit is contained in:
@@ -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}
|
||||
|
||||
Reference in New Issue
Block a user