Skip to content

Commit

Permalink
Fixed CI test to perform proper directory cleanup (#369)
Browse files Browse the repository at this point in the history
* Fixed CI test to perform proper directory cleanup

* Replaced cleanup with shutil.rmtree since python 3.9 does not support ignore_cleanup_errors args
  • Loading branch information
karan6181 authored Aug 8, 2023
1 parent 7236763 commit a7f4469
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions tests/common/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ def local_remote_dir() -> Any:
mock_remote_dir = os.path.join(mock_dir.name, 'remote')
yield mock_local_dir, mock_remote_dir
finally:
mock_dir.cleanup() # pyright: ignore
shutil.rmtree(mock_dir.name, ignore_errors=True) # pyright: ignore


@pytest.fixture(scope='function')
Expand All @@ -37,7 +37,7 @@ def compressed_local_remote_dir() -> Any:
mock_remote_dir = os.path.join(mock_dir.name, 'remote')
yield mock_compressed_dir, mock_local_dir, mock_remote_dir
finally:
mock_dir.cleanup() # pyright: ignore
shutil.rmtree(mock_dir.name, ignore_errors=True) # pyright: ignore


def convert_to_mds(**kwargs: Any):
Expand Down

0 comments on commit a7f4469

Please sign in to comment.