feat: add job pause and improve HLTB matching
CI / test (push) Successful in 1m17s

This commit is contained in:
strsv committed 2026-11-07 00:13:21 +03:00
1 parent ccc1f625e8
commit 5874ffba9f
13 files changed
+258 -34

No files matched your search

+21
View File
@@ -22,6 +22,27 @@ class HltbTests(unittest.TestCase):
self.assertEqual(fetch_hltb.find_match(entries, "hades").game_name, "Hades")
self.assertIsNone(fetch_hltb.find_match(entries, "Hade"))
def test_matches_case_roman_and_editions(self):
cases = [
("SOMA", "Soma"),
("INSIDE", "Inside"),
("Divinity: Original Sin 2", "Divinity: Original Sin II"),
("Stronghold Crusader HD", "Stronghold: Crusader"),
("Batman: Arkham Asylum GOTY Edition", "Batman: Arkham Asylum"),
("STAR WARS™ Republic Commando", "Star Wars: Republic Commando"),
("Age of Empires II (2013)", "Age of Empires II"),
("Dishonored RHCP", "Dishonored"),
("Serious Sam Classic: The First Encounter", "Serious Sam: The First Encounter"),
]
for query, title in cases:
entry = SimpleNamespace(game_name=title)
self.assertIs(fetch_hltb.find_match([entry], query), entry)
def test_search_variants_include_year(self):
variants = fetch_hltb.search_variants("DOOM", 2016)
self.assertIn("doom", variants)
self.assertIn("doom 2016", variants)
def test_positive(self):
self.assertEqual(fetch_hltb.positive("23.5"), 23.5)
self.assertIsNone(fetch_hltb.positive(0))