summaryrefslogtreecommitdiff
path: root/buildscripts/resmokelib/testing/hooks/check_primary.py
diff options
context:
space:
mode:
authorJonathan Abrahams <jonathan@mongodb.com>2018-03-27 14:30:46 -0400
committerJonathan Abrahams <jonathan@mongodb.com>2018-04-05 14:41:58 -0400
commitc50c68fef179d9306f1a3432f48985bf20555e38 (patch)
treea1c208329a090c54a8a1f02558b2be87b830a8ab /buildscripts/resmokelib/testing/hooks/check_primary.py
parenta5dacf7092f51055dd774a1911a48815bb9a1e0e (diff)
downloadmongo-c50c68fef179d9306f1a3432f48985bf20555e38.tar.gz
SERVER-23312 Python linting - Lint using pylint, pydocstyle & mypy
Diffstat (limited to 'buildscripts/resmokelib/testing/hooks/check_primary.py')
-rw-r--r--buildscripts/resmokelib/testing/hooks/check_primary.py7
1 files changed, 4 insertions, 3 deletions
diff --git a/buildscripts/resmokelib/testing/hooks/check_primary.py b/buildscripts/resmokelib/testing/hooks/check_primary.py
index c6beabbee84..f2624496d54 100644
--- a/buildscripts/resmokelib/testing/hooks/check_primary.py
+++ b/buildscripts/resmokelib/testing/hooks/check_primary.py
@@ -1,6 +1,4 @@
-"""
-Testing hook for verifying that the primary has not stepped down or changed.
-"""
+"""Test hook for verifying that the primary has not stepped down or changed."""
from __future__ import absolute_import
@@ -15,6 +13,7 @@ class CheckPrimary(interface.Hook):
"""Hook that checks that the primary is still primary after the test."""
def __init__(self, hook_logger, rs_fixture):
+ """Initialize CheckPrimary."""
description = "Verify that the primary has not stepped down or changed"
interface.Hook.__init__(self, hook_logger, rs_fixture, description)
@@ -39,9 +38,11 @@ class CheckPrimary(interface.Hook):
raise no_primary_err
def before_test(self, test, test_report):
+ """Before test hook primary."""
self._primary_url = self._get_primary_url()
def after_test(self, test, test_report):
+ """After test hook primary."""
new_primary_url = self._get_primary_url()
if new_primary_url != self._primary_url: