Skip to content

Commit

Permalink
import unittest adds 0.250s to script launch time
Browse files Browse the repository at this point in the history
This should not be imported at root level, since it adds a lot of initialization overhead without need.
  • Loading branch information
wonder-mice authored and Byron committed Jan 12, 2022
1 parent e24f9b7 commit 67d0631
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions git/objects/submodule/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,6 @@
import logging
import os
import stat

from unittest import SkipTest
import uuid

import git
Expand Down Expand Up @@ -934,6 +932,7 @@ def remove(self, module: bool = True, force: bool = False,
rmtree(str(wtd))
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
# END delete tree if possible
Expand All @@ -945,6 +944,7 @@ def remove(self, module: bool = True, force: bool = False,
rmtree(git_dir)
except Exception as ex:
if HIDE_WINDOWS_KNOWN_ERRORS:
from unittest import SkipTest
raise SkipTest(f"FIXME: fails with: PermissionError\n {ex}") from ex
else:
raise
Expand Down

0 comments on commit 67d0631

Please sign in to comment.