summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorwonder-mice <wonder.mice@gmail.com>2022-01-11 00:41:03 -0800
committerSebastian Thiel <sebastian.thiel@icloud.com>2022-01-12 08:22:33 +0800
commite24f9b70209eb6681f055596846033f7d3215ea5 (patch)
treed59dd8dfaf58f18db68b2e43ff8acf378709c14e
parent35e302da2d9cfa8004414c2b325d194e7d77d9d9 (diff)
downloadgitpython-e24f9b70209eb6681f055596846033f7d3215ea5.tar.gz
import unittest adds 0.250s to script launch time
This should not be imported at root level, since it adds a lot of initialization overhead without need.
-rw-r--r--git/util.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/git/util.py b/git/util.py
index b81332ea..6e6f0955 100644
--- a/git/util.py
+++ b/git/util.py
@@ -20,7 +20,6 @@ import shutil
import stat
from sys import maxsize
import time
-from unittest import SkipTest
from urllib.parse import urlsplit, urlunsplit
import warnings
@@ -130,6 +129,7 @@ def rmtree(path: PathLike) -> None:
func(path) # Will scream if still not possible to delete.
except Exception as ex:
if HIDE_WINDOWS_KNOWN_ERRORS:
+ from unittest import SkipTest
raise SkipTest("FIXME: fails with: PermissionError\n {}".format(ex)) from ex
raise