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