fix: update dialect tests for PR #147 stats API and remove unused fixture param

This commit is contained in:
Igor Lins e Silva
2026-04-07 18:58:28 -03:00
parent 541e9bd1ee
commit e5b3434e9b
2 changed files with 4 additions and 4 deletions
+1 -1
View File
@@ -35,7 +35,7 @@ from mempalace.knowledge_graph import KnowledgeGraph # noqa: E402
@pytest.fixture(scope="session", autouse=True)
def _isolate_home(tmp_path_factory):
def _isolate_home():
"""Ensure HOME points to a temp dir for the entire test session.
The env vars were already set at module level (above) so that
+3 -3
View File
@@ -109,11 +109,11 @@ class TestCompressionStats:
original = "We decided to use GraphQL instead of REST. " * 10
compressed = d.compress(original)
stats = d.compression_stats(original, compressed)
assert stats["ratio"] > 1
assert stats["original_chars"] > stats["compressed_chars"]
assert stats["size_ratio"] > 1
assert stats["original_chars"] > stats["summary_chars"]
def test_count_tokens(self):
assert Dialect.count_tokens("hello world") == len("hello world") // 3
assert Dialect.count_tokens("hello world") == 2
class TestZettelEncoding: