diff --git a/tests/conftest.py b/tests/conftest.py index d0c30c2..22b5e42 100644 --- a/tests/conftest.py +++ b/tests/conftest.py @@ -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 diff --git a/tests/test_dialect.py b/tests/test_dialect.py index 2ef1df6..8edc7ec 100644 --- a/tests/test_dialect.py +++ b/tests/test_dialect.py @@ -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: