MCPcopy Create free account
hub / github.com/PaddlePaddle/Paddle / prepare

Method prepare

tools/sampcd_processor_utils.py:288–299  ·  view source on GitHub ↗

Something before run the test. Xdoctest need to set the `os.environ` according to the test capacity, which `+REQUIRES` used to match the test required environment. Legacy sample code processor do NOT need. Args: test_capacity(set): the test capacity, li

(self, test_capacity: set)

Source from the content-addressed store, hash-verified

286 return docstring
287
288 def prepare(self, test_capacity: set) -> None:
289 """Something before run the test.
290
291 Xdoctest need to set the `os.environ` according to the test capacity,
292 which `+REQUIRES` used to match the test required environment.
293
294 Legacy sample code processor do NOT need.
295
296 Args:
297 test_capacity(set): the test capacity, like `cpu`, `gpu` and so on.
298 """
299 pass
300
301 def run(self, api_name: str, docstring: str) -> list[TestResult]:
302 """Extract codeblocks from docstring, and run the test.

Callers 1

run_doctestFunction · 0.45

Calls

no outgoing calls

Tested by

no test coverage detected