fix: update dialect tests for PR #147 stats API and remove unused fixture param
This commit is contained in:
+1
-1
@@ -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
|
||||
|
||||
@@ -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:
|
||||
|
||||
Reference in New Issue
Block a user