MCPcopy
hub / github.com/PDFMathTranslate/PDFMathTranslate / test_engine_distinction

Method test_engine_distinction

test/test_cache.py:66–77  ·  view source on GitHub ↗

Test that cache distinguishes between different translation engines

(self)

Source from the content-addressed store, hash-verified

64 self.assertEqual(cache_instance3.get("hello"), "你好3")
65
66 def test_engine_distinction(self):
67 """Test that cache distinguishes between different translation engines"""
68 cache1 = cache.TranslationCache("engine1")
69 cache2 = cache.TranslationCache("engine2")
70
71 # Set same text with different engines
72 cache1.set("hello", "你好 1")
73 cache2.set("hello", "你好 2")
74
75 # Verify each engine gets its own translation
76 self.assertEqual(cache1.get("hello"), "你好 1")
77 self.assertEqual(cache2.get("hello"), "你好 2")
78
79 def test_params_distinction(self):
80 """Test that cache distinguishes between different engine parameters"""

Callers

nothing calls this directly

Calls 2

setMethod · 0.95
getMethod · 0.95

Tested by

no test coverage detected