Skip to content

Add pragma: no cover to avoid spurious cov changes #129

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Dec 13, 2017
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 6 additions & 2 deletions Lib/slapdtest/_slapdtest.py
Original file line number Diff line number Diff line change
Expand Up @@ -344,7 +344,9 @@ def _start_slapd(self):
self._log.info('starting slapd: %r', ' '.join(slapd_args))
self._proc = subprocess.Popen(slapd_args)
# Waits until the LDAP server socket is open, or slapd crashed
while 1:
# no cover to avoid spurious coverage changes, see
# https://github.com/python-ldap/python-ldap/issues/127
while 1: # pragma: no cover
if self._proc.poll() is not None:
self._stopped()
raise RuntimeError("slapd exited before opening port")
Expand Down Expand Up @@ -430,7 +432,9 @@ def _cli_auth_args(self):
]
return authc_args

def _cli_popen(self, ldapcommand, extra_args=None, ldap_uri=None, stdin_data=None):
# no cover to avoid spurious coverage changes
def _cli_popen(self, ldapcommand, extra_args=None, ldap_uri=None,
stdin_data=None): # pragma: no-cover
args = [
ldapcommand,
'-H', ldap_uri or self.ldapi_uri,
Expand Down