Skip to content

Commit

Permalink
TST: catch Artifactory error during tear down
Browse files Browse the repository at this point in the history
  • Loading branch information
hagenw committed May 7, 2024
1 parent 1271c9b commit 362b1f0
Showing 1 changed file with 12 additions and 1 deletion.
13 changes: 12 additions & 1 deletion tests/conftest.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import getpass
import os

import dohq_artifactory
import pytest

import audeer
Expand Down Expand Up @@ -94,7 +95,17 @@ def interface(tmpdir_factory, request):
yield interface

if artifactory:
backend._repo.delete()
try:
backend._repo.delete()
except dohq_artifactory.exception.ArtifactoryException:
# It might happen from time to time,
# that a repository cannot be deleted.
# In those cases,
# we don't raise an error here,
# but rely on the user calling the clean up script
# from time to time:
# $ python tests/misc/cleanup_artifactory.py
pass

if not artifactory:
backend_cls.delete(host, repository)
Expand Down

0 comments on commit 362b1f0

Please sign in to comment.