diff options
Diffstat (limited to 'buildscripts/resmokelib/testing/testcases/sleeptest.py')
-rw-r--r-- | buildscripts/resmokelib/testing/testcases/sleeptest.py | 14 |
1 files changed, 5 insertions, 9 deletions
diff --git a/buildscripts/resmokelib/testing/testcases/sleeptest.py b/buildscripts/resmokelib/testing/testcases/sleeptest.py index f521ecea870..163100095d3 100644 --- a/buildscripts/resmokelib/testing/testcases/sleeptest.py +++ b/buildscripts/resmokelib/testing/testcases/sleeptest.py @@ -1,6 +1,4 @@ -""" -unittest.TestCase for sleeping a given amount of time. -""" +"""The unittest.TestCase for sleeping a given amount of time.""" from __future__ import absolute_import @@ -10,13 +8,12 @@ from . import interface class SleepTestCase(interface.TestCase): + """SleepTestCase class.""" REGISTERED_NAME = "sleep_test" def __init__(self, logger, sleep_duration_secs): - """ - Initializes the SleepTestCase with the duration to sleep for. - """ + """Initialize the SleepTestCase with the duration to sleep for.""" sleep_duration_secs = int(sleep_duration_secs) @@ -26,11 +23,10 @@ class SleepTestCase(interface.TestCase): self.__sleep_duration_secs = sleep_duration_secs def run_test(self): + """Execute sleep.""" time.sleep(self.__sleep_duration_secs) self.return_code = 0 def as_command(self): - """ - Returns the command invocation used to run the test. - """ + """Return the command invocation used to run the test.""" return "sleep {:d}".format(self.__sleep_duration_secs) |