mirror of https://github.com/zulip/zulip.git
coverage: Exclude uncovered lines in test_signup.
This commit is contained in:
parent
ff9f827c9a
commit
065651b4fe
|
@ -2,11 +2,13 @@
|
|||
# Regexes for lines to exclude from consideration
|
||||
exclude_lines =
|
||||
# Re-enable the standard coverage pragma
|
||||
pragma: no cover
|
||||
nocoverage
|
||||
# Don't complain if non-runnable code isn't run:
|
||||
if False:
|
||||
# Don't require coverage for base class NotImplementedErrors
|
||||
raise NotImplementedError()
|
||||
# Don't require coverage for test suite AssertionError -- they're usually for clarity
|
||||
raise AssertionError
|
||||
# Don't require coverage for Python 2/3 variations; it's impossible to cover on both
|
||||
if six.PY3:
|
||||
if six.PY2:
|
||||
|
|
|
@ -88,7 +88,6 @@ not_yet_fully_covered = {
|
|||
'zerver/tests/test_email_mirror.py',
|
||||
'zerver/tests/test_events.py',
|
||||
'zerver/tests/test_narrow.py',
|
||||
'zerver/tests/test_signup.py',
|
||||
'zerver/tests/test_subs.py',
|
||||
'zerver/tests/test_templates.py',
|
||||
'zerver/tests/test_tornado.py',
|
||||
|
|
|
@ -98,7 +98,7 @@ class PublicURLTest(ZulipTestCase):
|
|||
# 'index.md') to `get_urls['200']` list.
|
||||
for doc in os.listdir('./templates/zerver/help'):
|
||||
if doc.startswith(".") or '~' in doc or '#' in doc:
|
||||
continue
|
||||
continue # nocoverage -- just here for convenience
|
||||
if doc not in {'main.html', 'index.md', 'include'}:
|
||||
get_urls[200].append('/help/' + os.path.splitext(doc)[0]) # Strip the extension.
|
||||
|
||||
|
@ -1059,7 +1059,7 @@ class UserSignUpTest(ZulipTestCase):
|
|||
message.body).groups()[0]
|
||||
break
|
||||
else:
|
||||
raise ValueError("Couldn't find a confirmation email.")
|
||||
raise AssertionError("Couldn't find a confirmation email.")
|
||||
|
||||
result = self.client_get(confirmation_url)
|
||||
self.assertEqual(result.status_code, 200)
|
||||
|
@ -1100,7 +1100,7 @@ class UserSignUpTest(ZulipTestCase):
|
|||
message.body).groups()[0]
|
||||
break
|
||||
else:
|
||||
raise ValueError("Couldn't find a confirmation email.")
|
||||
raise AssertionError("Couldn't find a confirmation email.")
|
||||
|
||||
result = self.client_get(confirmation_url)
|
||||
self.assertEqual(result.status_code, 200)
|
||||
|
@ -1179,7 +1179,7 @@ class UserSignUpTest(ZulipTestCase):
|
|||
message.body).groups()[0]
|
||||
break
|
||||
else:
|
||||
raise ValueError("Couldn't find a confirmation email.")
|
||||
raise AssertionError("Couldn't find a confirmation email.")
|
||||
|
||||
with self.settings(
|
||||
POPULATE_PROFILE_VIA_LDAP=True,
|
||||
|
@ -1253,7 +1253,7 @@ class UserSignUpTest(ZulipTestCase):
|
|||
message.body).groups()[0]
|
||||
break
|
||||
else:
|
||||
raise ValueError("Couldn't find a confirmation email.")
|
||||
raise AssertionError("Couldn't find a confirmation email.")
|
||||
|
||||
result = self.client_get(confirmation_url)
|
||||
self.assertEqual(result.status_code, 200)
|
||||
|
|
Loading…
Reference in New Issue