Test that cache distinguishes between different translation engines
(self)
| 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""" |