Skip to content

Commit

Permalink
renaming test methods to execute them in order
Browse files Browse the repository at this point in the history
  • Loading branch information
KevKibe committed Apr 17, 2024
1 parent ca73bd1 commit 5b16ffc
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/tests/googleindex_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ def setUp(self):
self.indexer = GooglePineconeIndexer(self.index_name, self.pinecone_api_key, self.google_api_key)

@patch('sys.stdout', new_callable=StringIO)
def test_create_index(self, mock_stdout):
def test_01_create_index(self, mock_stdout):
"""
Test creating an index and assert the output.
"""
Expand All @@ -34,7 +34,7 @@ def test_create_index(self, mock_stdout):
self.assertEqual(index_created_message_1, f"Index {self.index_name} created successfully!")

@patch('builtins.print')
def test_index_documents(self, mock_print):
def test_02_index_documents(self, mock_print):
"""
Test indexing documents and assert the type of the index.
"""
Expand All @@ -43,15 +43,15 @@ def test_index_documents(self, mock_print):
index = self.indexer.pc.Index(self.index_name)
self.assertIsInstance(index, pinecone.data.index.Index)

def test_initialize_vectorstore(self):
def test_03_initialize_vectorstore(self):
"""
Test initializing the vector store and assert its type.
"""
vectorstore = self.indexer.initialize_vectorstore(self.index_name)
self.assertIsInstance(vectorstore, PineconeVectorStore)

@patch('sys.stdout', new_callable=StringIO)
def test_delete_index(self, mock_stdout):
def test_04_delete_index(self, mock_stdout):
"""
Test deleting an index and assert the output.
"""
Expand Down

0 comments on commit 5b16ffc

Please sign in to comment.