Skip to content

Commit cf24a54

Browse files
tiranencukou
authored andcommitted
Add pragma: no cover to avoid spurious cov changes
"pragma: no cover" was added to two helper functions in slapdtest to avoid spurious changes in coverage whenever slapd has a hick up. python-ldap#129 Closes: python-ldap#127 Signed-off-by: Christian Heimes <cheimes@redhat.com>
1 parent 9dff161 commit cf24a54

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

Lib/slapdtest/_slapdtest.py

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -344,7 +344,9 @@ def _start_slapd(self):
344344
self._log.info('starting slapd: %r', ' '.join(slapd_args))
345345
self._proc = subprocess.Popen(slapd_args)
346346
# Waits until the LDAP server socket is open, or slapd crashed
347-
while 1:
347+
# no cover to avoid spurious coverage changes, see
348+
# https://github.com/python-ldap/python-ldap/issues/127
349+
while 1: # pragma: no cover
348350
if self._proc.poll() is not None:
349351
self._stopped()
350352
raise RuntimeError("slapd exited before opening port")
@@ -430,7 +432,9 @@ def _cli_auth_args(self):
430432
]
431433
return authc_args
432434

433-
def _cli_popen(self, ldapcommand, extra_args=None, ldap_uri=None, stdin_data=None):
435+
# no cover to avoid spurious coverage changes
436+
def _cli_popen(self, ldapcommand, extra_args=None, ldap_uri=None,
437+
stdin_data=None): # pragma: no-cover
434438
args = [
435439
ldapcommand,
436440
'-H', ldap_uri or self.ldapi_uri,

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy