summaryrefslogtreecommitdiff
path: root/gitlab
diff options
context:
space:
mode:
authorNejc Habjan <hab.nejc@gmail.com>2021-11-28 00:50:49 +0100
committerJohn Villalovos <john@sodarock.com>2022-05-29 16:56:36 -0700
commitdf072e130aa145a368bbdd10be98208a25100f89 (patch)
treed52fc1a500bc510a76bea8dba4d7b304a66b83df /gitlab
parentc51b538caae0a94d936d94d6da60c362492f9403 (diff)
downloadgitlab-df072e130aa145a368bbdd10be98208a25100f89.tar.gz
test(gitlab): increase unit test coverage
Diffstat (limited to 'gitlab')
-rw-r--r--gitlab/client.py4
-rw-r--r--gitlab/config.py8
2 files changed, 8 insertions, 4 deletions
diff --git a/gitlab/client.py b/gitlab/client.py
index 2ac5158..bba5c1d 100644
--- a/gitlab/client.py
+++ b/gitlab/client.py
@@ -208,7 +208,9 @@ class Gitlab:
self.__dict__.update(state)
# We only support v4 API at this time
if self._api_version not in ("4",):
- raise ModuleNotFoundError(name=f"gitlab.v{self._api_version}.objects")
+ raise ModuleNotFoundError(
+ name=f"gitlab.v{self._api_version}.objects"
+ ) # pragma: no cover, dead code currently
# NOTE: We must delay import of gitlab.v4.objects until now or
# otherwise it will cause circular import errors
import gitlab.v4.objects
diff --git a/gitlab/config.py b/gitlab/config.py
index c85d7e5..337a265 100644
--- a/gitlab/config.py
+++ b/gitlab/config.py
@@ -154,7 +154,7 @@ class GitlabConfigParser:
# CA bundle.
try:
self.ssl_verify = _config.get("global", "ssl_verify")
- except Exception:
+ except Exception: # pragma: no cover
pass
except Exception:
pass
@@ -166,7 +166,7 @@ class GitlabConfigParser:
# CA bundle.
try:
self.ssl_verify = _config.get(self.gitlab_id, "ssl_verify")
- except Exception:
+ except Exception: # pragma: no cover
pass
except Exception:
pass
@@ -197,7 +197,9 @@ class GitlabConfigParser:
try:
self.http_username = _config.get(self.gitlab_id, "http_username")
- self.http_password = _config.get(self.gitlab_id, "http_password")
+ self.http_password = _config.get(
+ self.gitlab_id, "http_password"
+ ) # pragma: no cover
except Exception:
pass