Skip to content

Commit 54b5b90

Browse files
authored
Merge pull request #325 from nbcsm/pretrain
run_pretrained_model delete TMPPATH after test
2 parents ed9cb4f + dc8e87a commit 54b5b90

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

tests/run_pretrained_models.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@
1010

1111
import argparse
1212
import os
13+
import shutil
1314
import sys
1415
import tarfile
1516
import tempfile
@@ -438,6 +439,9 @@ def main():
438439
except Exception as ex:
439440
ret = None
440441
print(ex)
442+
finally:
443+
if os.path.exists(TMPPATH) and not args.debug:
444+
shutil.rmtree(TMPPATH)
441445
if not ret:
442446
failed += 1
443447

0 commit comments

Comments
 (0)