summaryrefslogtreecommitdiff
path: root/test/test_base.py
diff options
context:
space:
mode:
Diffstat (limited to 'test/test_base.py')
-rw-r--r--test/test_base.py9
1 files changed, 7 insertions, 2 deletions
diff --git a/test/test_base.py b/test/test_base.py
index ccfdc8ed..30029367 100644
--- a/test/test_base.py
+++ b/test/test_base.py
@@ -9,6 +9,7 @@ import sys
import tempfile
from unittest import SkipTest, skipIf
+from git import Repo
from git.objects import Blob, Tree, Commit, TagObject
from git.compat import is_win
from git.objects.util import get_object_type_by_name
@@ -95,14 +96,18 @@ class TestBase(_TestBase):
self.assertEqual(self.rorepo.head.reference.object, self.rorepo.active_branch.object)
@with_rw_repo("HEAD", bare=True)
- def test_with_bare_rw_repo(self, bare_rw_repo):
+ def test_with_bare_rw_repo(self, bare_rw_repo: Repo):
assert bare_rw_repo.config_reader("repository").getboolean("core", "bare")
assert osp.isfile(osp.join(bare_rw_repo.git_dir, "HEAD"))
+ assert osp.isdir(bare_rw_repo.working_dir)
+ assert bare_rw_repo.working_tree_dir is None
@with_rw_repo("0.1.6")
- def test_with_rw_repo(self, rw_repo):
+ def test_with_rw_repo(self, rw_repo: Repo):
assert not rw_repo.config_reader("repository").getboolean("core", "bare")
+ assert osp.isdir(rw_repo.working_tree_dir)
assert osp.isdir(osp.join(rw_repo.working_tree_dir, "lib"))
+ assert osp.isdir(rw_repo.working_dir)
@skipIf(HIDE_WINDOWS_FREEZE_ERRORS, "FIXME: Freezes! sometimes...")
@with_rw_and_rw_remote_repo("0.1.6")