Skip to content

Commit

Permalink
Trying to fix gpt and cellxgene installation for testing
Browse files Browse the repository at this point in the history
  • Loading branch information
lauraluebbert committed May 15, 2023
1 parent 00bd401 commit 279bed2
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 8 deletions.
6 changes: 2 additions & 4 deletions tests/test_cellxgene.py
Original file line number Diff line number Diff line change
Expand Up @@ -37,11 +37,8 @@ def repr_dict(adata):


class TestCellxgene(unittest.TestCase):
def install_dependencies(self):
module = "cellxgene"
gget_setup(module)

def test_cellxgene_adata(self):
gget_setup("cellxgene")
test = "test1"
expected_result = cellxgene_dict[test]["expected_result"]
result_to_test = cellxgene(**cellxgene_dict[test]["args"])
Expand All @@ -52,6 +49,7 @@ def test_cellxgene_adata(self):
self.assertEqual(result_to_test, expected_result)

def test_cellxgene_metadata(self):
gget_setup("cellxgene")
test = "test2"
expected_result = cellxgene_dict[test]["expected_result"]
result_to_test = cellxgene(**cellxgene_dict[test]["args"])
Expand Down
6 changes: 2 additions & 4 deletions tests/test_gpt.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +5,10 @@


class TestGpt(unittest.TestCase):
def install_dependencies(self):
module = "gpt"
gget_setup(module)

@patch("openai.ChatCompletion.create")
def test_gpt(self, mock_create):
gget_setup("gpt")

# Mock the response from the API
mock_response = {
"choices": [{"message": {"content": "This is a generated response."}}],
Expand Down

0 comments on commit 279bed2

Please sign in to comment.