diff options
author | Elena ``of Valhalla'' Grandi <valhalla@trueelena.org> | 2024-02-25 20:16:51 +0100 |
---|---|---|
committer | Elena ``of Valhalla'' Grandi <valhalla@trueelena.org> | 2024-02-25 20:16:51 +0100 |
commit | 2f4a229b7af6cbb4955ad57ed4769eab3f17bedc (patch) | |
tree | 0665db87db6c620ab54f88dc85aa181aa1aa18f5 /tests/utils.py | |
parent | 70ed1dcf05aa9cd7e3c03afd47625dc8a75ab556 (diff) |
Remove compatibility helper for python < 3.8
Diffstat (limited to 'tests/utils.py')
-rw-r--r-- | tests/utils.py | 18 |
1 files changed, 0 insertions, 18 deletions
diff --git a/tests/utils.py b/tests/utils.py deleted file mode 100644 index a56a120..0000000 --- a/tests/utils.py +++ /dev/null @@ -1,18 +0,0 @@ -import shutil -import sys - - -def copytree(src, dest, dirs_exist_ok=False): - """ - Helper function to remove existing directories - - Used in the tests for compatibility with python < 3.8 - """ - if sys.version_info >= (3, 8): - shutil.copytree(src, dest, dirs_exist_ok=dirs_exist_ok) - else: - if dirs_exist_ok: - if not dest.startswith('/tmp'): - raise ValueError("Refusing to delete a directory outside /tmp") - shutil.rmtree(dest) - shutil.copytree(src, dest) |