Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix milvus test Error: 'NameError: name 'MockConfig' is not defined' #2061

Merged

Conversation

wangxuqi
Copy link
Contributor

Background

After minimall add pytest (#1859) merged. The test case is not worked. Try to fix it.

=================================== FAILURES ===================================
__________________________ TestMilvusMemory.test_add ___________________________

self = <tests.milvus_memory_test.TestMilvusMemory testMethod=test_add>

    def setUp(self) -> None:
        """Set up the test environment"""
>       self.cfg = MockConfig()
E       NameError: name 'MockConfig' is not defined

Changes

call correct mock_config(), not MockConfig()

Test Plan

============================= test session starts ==============================
collecting ... collected 5 items

milvus_memory_test.py::TestMilvusMemory::test_add 
milvus_memory_test.py::TestMilvusMemory::test_clear 
milvus_memory_test.py::TestMilvusMemory::test_get 
milvus_memory_test.py::TestMilvusMemory::test_get_relevant 
milvus_memory_test.py::TestMilvusMemory::test_get_stats 

============================== 5 passed in 20.20s ==============================

PR Quality Checklist

  • My pull request is atomic and focuses on a single change.
  • I have thoroughly tested my changes with multiple different prompts.
  • I have considered potential risks and mitigations for my changes.
  • I have documented my changes clearly and comprehensively.
  • I have not snuck in any "extra" small tweaks changes

@richbeales richbeales merged commit 2cb559e into Significant-Gravitas:master Apr 17, 2023
@wangxuqi wangxuqi deleted the milvus_memory_test_fix branch April 17, 2023 07:42
sindlinger pushed a commit to Orgsindlinger/Auto-GPT-WebUI that referenced this pull request Sep 25, 2024
…ory_test_fix

Fix milvus test Error: 'NameError: name 'MockConfig' is not defined'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants