Skip to content

Commit

Permalink
fix: Tests not cleaning up properly
Browse files Browse the repository at this point in the history
  • Loading branch information
rehoumir committed Aug 19, 2024
1 parent 02cf318 commit b7d8833
Showing 1 changed file with 6 additions and 8 deletions.
14 changes: 6 additions & 8 deletions tests/test_upload.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
import asyncio
import dataclasses
import os
import subprocess
Expand Down Expand Up @@ -172,14 +171,13 @@ async def source_and_target_schema(client: ElisAPIClient, tmp_path):

# In case our test failed to delete the schema(s)
try:
await asyncio.gather(
*[
client.delete_schema(source_schema.id),
client.delete_schema(target_schema.id),
]
)
await client.delete_schema(source_schema.id)
except Exception:
print("source_schema already deleted.")
try:
await client.delete_schema(target_schema.id)
except Exception:
print("Schema already deleted.")
print("target_schema already deleted.")


@pytest.mark.asyncio
Expand Down

0 comments on commit b7d8833

Please sign in to comment.