diff options
author | Clayton Walker <clayton.m.walker@gmail.com> | 2023-02-02 10:00:18 -0700 |
---|---|---|
committer | Clayton Walker <clayton.m.walker@gmail.com> | 2023-02-02 10:00:18 -0700 |
commit | fb6eb3d5eb56ce9f27cf23387053d440d6786fe2 (patch) | |
tree | 8db2147e7830c4046abd7d770a267ad2de88282f | |
parent | bc8f1191a3befd1051bd676df630b2fa005fecf0 (diff) | |
download | gitpython-fb6eb3d5eb56ce9f27cf23387053d440d6786fe2.tar.gz |
Add additional assertions to test_base.py
-rw-r--r-- | test/test_base.py | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/test/test_base.py b/test/test_base.py index 5c89fd4f..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,15 +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") |