mirror of
https://github.com/facebook/sapling.git
synced 2024-10-07 07:17:55 +03:00
run-tests: add some docstrings
This commit is contained in:
parent
5be656d402
commit
29c42e357d
@ -128,6 +128,7 @@ def parselistfiles(files, listtype, warn=True):
|
|||||||
return entries
|
return entries
|
||||||
|
|
||||||
def getparser():
|
def getparser():
|
||||||
|
"""Obtain the OptionParser used by the CLI."""
|
||||||
parser = optparse.OptionParser("%prog [options] [tests]")
|
parser = optparse.OptionParser("%prog [options] [tests]")
|
||||||
|
|
||||||
# keep these sorted
|
# keep these sorted
|
||||||
@ -208,6 +209,7 @@ def getparser():
|
|||||||
return parser
|
return parser
|
||||||
|
|
||||||
def parseargs(args, parser):
|
def parseargs(args, parser):
|
||||||
|
"""Parse arguments with our OptionParser and validate results."""
|
||||||
(options, args) = parser.parse_args(args)
|
(options, args) = parser.parse_args(args)
|
||||||
|
|
||||||
# jython is always pure
|
# jython is always pure
|
||||||
@ -370,6 +372,10 @@ class Test(object):
|
|||||||
shutil.rmtree(self._threadtmp, True)
|
shutil.rmtree(self._threadtmp, True)
|
||||||
|
|
||||||
def run(self):
|
def run(self):
|
||||||
|
"""Run this test instance.
|
||||||
|
|
||||||
|
This will return a tuple describing the result of the test.
|
||||||
|
"""
|
||||||
if not os.path.exists(self._path):
|
if not os.path.exists(self._path):
|
||||||
return self.skip("Doesn't exist")
|
return self.skip("Doesn't exist")
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user