From e24f9b70209eb6681f055596846033f7d3215ea5 Mon Sep 17 00:00:00 2001 From: wonder-mice Date: Tue, 11 Jan 2022 00:41:03 -0800 Subject: 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. --- git/util.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'git') 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 -- cgit v1.2.1