diff options
Diffstat (limited to 'buildscripts/resmokelib/testing/testcases/pytest.py')
-rw-r--r-- | buildscripts/resmokelib/testing/testcases/pytest.py | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/buildscripts/resmokelib/testing/testcases/pytest.py b/buildscripts/resmokelib/testing/testcases/pytest.py index 6c1c343f197..fe62b18e154 100644 --- a/buildscripts/resmokelib/testing/testcases/pytest.py +++ b/buildscripts/resmokelib/testing/testcases/pytest.py @@ -1,6 +1,4 @@ -""" -unittest.TestCase for Python unittests. -""" +"""The unittest.TestCase for Python unittests.""" import os import unittest @@ -8,13 +6,16 @@ from buildscripts.resmokelib.testing.testcases import interface class PyTestCase(interface.TestCase): + """A python test to execute.""" REGISTERED_NAME = "py_test" def __init__(self, logger, py_filename): + """Initialize PyTestCase.""" interface.TestCase.__init__(self, logger, "PyTest", py_filename) def run_test(self): + """Execute the test.""" suite = unittest.defaultTestLoader.loadTestsFromName(self.test_module_name) result = unittest.TextTestRunner().run(suite) if result.failures: @@ -24,6 +25,7 @@ class PyTestCase(interface.TestCase): self.return_code = 0 def as_command(self): + """Return execute command.""" return "python -m unittest {}".format(self.test_module_name) @property |