File tree 1 file changed +3
-3
lines changed
1 file changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -760,11 +760,11 @@ async def test_credentials(gptscript):
760
760
761
761
@pytest .mark .asyncio
762
762
async def test_datasets (gptscript ):
763
- workspace_id = await gptscript .create_workspace ("directory" )
763
+ os . environ [ "GPTSCRIPT_WORKSPACE_ID" ] = await gptscript .create_workspace ("directory" )
764
764
765
765
new_client = GPTScript (GlobalOptions (
766
766
apiKey = os .getenv ("OPENAI_API_KEY" ),
767
- env = [f"GPTSCRIPT_WORKSPACE_ID= { workspace_id } " ],
767
+ env = [f"{ k } = { v } " for k , v in os . environ . items () ],
768
768
))
769
769
770
770
# Create dataset
@@ -812,7 +812,7 @@ async def test_datasets(gptscript):
812
812
assert datasets [0 ].name == "test-dataset" , "Expected dataset name to match"
813
813
assert datasets [0 ].description == "test dataset description" , "Expected dataset description to match"
814
814
815
- await gptscript .delete_workspace (workspace_id )
815
+ await gptscript .delete_workspace (os . environ [ "GPTSCRIPT_WORKSPACE_ID" ] )
816
816
817
817
818
818
@pytest .mark .asyncio
You can’t perform that action at this time.
0 commit comments