Skip to content

Commit

Permalink
add delay before removing mp4/
Browse files Browse the repository at this point in the history
  • Loading branch information
irahorecka committed Feb 25, 2024
1 parent 8ad419c commit be605bc
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 0 deletions.
1 change: 1 addition & 0 deletions main.py
Original file line number Diff line number Diff line change
Expand Up @@ -482,6 +482,7 @@ def run(self):
for index, key_value in enumerate(self.videos_dict.items()) # dict is naturally sorted in iteration
)
utils.map_threads(utils.thread_query_youtube, video_properties)
time.sleep(1)
shutil.rmtree(mp4_path) # remove mp4 dir
time1 = time.time()

Expand Down
2 changes: 2 additions & 0 deletions tests/test_utils.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
"""Test functions in utils/ directory"""
import os
import sys
import time
import unittest

# get base directory and import util files
Expand Down Expand Up @@ -206,6 +207,7 @@ def tearDown(self):

if os.path.exists(self.test_mp4_dirpath):
# remove mp4 dir if it exists
time.sleep(1)
shutil.rmtree(self.test_mp4_dirpath)

# TODO: add tests for mp3 and mp4 annotations -- above tests are for high-level functions.
Expand Down

0 comments on commit be605bc

Please sign in to comment.