MCPcopy Create free account
hub / github.com/boostorg/build / no_result

Function no_result

v2/test/TestCmd.py:133–158  ·  view source on GitHub ↗

Causes a test to exit with no valid result. By default, the no_result() method reports NO RESULT for the test and exits with a status of 2. If a condition argument is supplied, the test fails only if the condition is true.

(self=None, condition=True, function=None, skip=0)

Source from the content-addressed store, hash-verified

131
132
133def no_result(self=None, condition=True, function=None, skip=0):
134 """Causes a test to exit with no valid result.
135
136 By default, the no_result() method reports NO RESULT for the test and
137 exits with a status of 2. If a condition argument is supplied, the test
138 fails only if the condition is true.
139
140 """
141 if not condition:
142 return
143 if not function is None:
144 function()
145 of = ""
146 desc = ""
147 sep = " "
148 if not self is None:
149 if self.program:
150 of = " of " + self.program
151 sep = "\n\t"
152 if self.description:
153 desc = " [" + self.description + "]"
154 sep = "\n\t"
155
156 at = caller(traceback.extract_stack(), skip)
157 sys.stderr.write("NO RESULT for test" + of + desc + sep + at)
158 sys.exit(2)
159
160
161def pass_test(self=None, condition=True, function=None):

Callers 1

no_resultMethod · 0.85

Calls 2

callerFunction · 0.85
writeMethod · 0.45

Tested by

no test coverage detected