Skip to content

Commit fb6eb3d

Browse files
committed
Add additional assertions to test_base.py
1 parent bc8f119 commit fb6eb3d

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

test/test_base.py

+6-2
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@
99
import tempfile
1010
from unittest import SkipTest, skipIf
1111

12+
from git import Repo
1213
from git.objects import Blob, Tree, Commit, TagObject
1314
from git.compat import is_win
1415
from git.objects.util import get_object_type_by_name
@@ -95,15 +96,18 @@ def test_object_resolution(self):
9596
self.assertEqual(self.rorepo.head.reference.object, self.rorepo.active_branch.object)
9697

9798
@with_rw_repo("HEAD", bare=True)
98-
def test_with_bare_rw_repo(self, bare_rw_repo):
99+
def test_with_bare_rw_repo(self, bare_rw_repo: Repo):
99100
assert bare_rw_repo.config_reader("repository").getboolean("core", "bare")
100101
assert osp.isfile(osp.join(bare_rw_repo.git_dir, "HEAD"))
101102
assert osp.isdir(bare_rw_repo.working_dir)
103+
assert bare_rw_repo.working_tree_dir is None
102104

103105
@with_rw_repo("0.1.6")
104-
def test_with_rw_repo(self, rw_repo):
106+
def test_with_rw_repo(self, rw_repo: Repo):
105107
assert not rw_repo.config_reader("repository").getboolean("core", "bare")
108+
assert osp.isdir(rw_repo.working_tree_dir)
106109
assert osp.isdir(osp.join(rw_repo.working_tree_dir, "lib"))
110+
assert osp.isdir(rw_repo.working_dir)
107111

108112
@skipIf(HIDE_WINDOWS_FREEZE_ERRORS, "FIXME: Freezes! sometimes...")
109113
@with_rw_and_rw_remote_repo("0.1.6")

0 commit comments

Comments
 (0)