Skip to content

Commit 4f6d66e

Browse files
fix: ensure parent module is imported in test configuration
- Add contextforge_memory import to setup_test_environment fixture - Resolves KeyError: 'contextforge_memory' in CI tests - Ensures parent module is available before submodule imports - Fixes remaining 26 test failures in CI
1 parent 37d070e commit 4f6d66e

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

tests/conftest.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -77,6 +77,10 @@ def setup_test_environment() -> Generator[None, None, None]:
7777
)
7878
os.environ["CF_OPENAI_API_KEY"] = "test-openai-key-32-chars-long"
7979
os.environ["OPENAI_API_KEY"] = "test-openai-key-32-chars-long"
80+
81+
# Ensure parent module is imported to avoid KeyError: 'contextforge_memory'
82+
import contextforge_memory # noqa: F401
83+
8084
yield
8185
# Cleanup after tests
8286
for key in ["TESTING", "CF_API_KEY", "CF_OPENAI_API_KEY", "OPENAI_API_KEY"]:

0 commit comments

Comments
 (0)