用法:
test.support.load_package_tests(pkg_dir, loader, standard_tests, pattern)
unittest
load_tests
協議的通用實現,用於測試包。pkg_dir
是包的根目錄;loader
,standard_tests
和pattern
是load_tests
預期的參數。在簡單的情況下,測試包的__init__.py
可以如下:import os from test.support import load_package_tests def load_tests(*args): return load_package_tests(os.path.dirname(__file__), *args)
相關用法
- Python test.support.catch_unraisable_exception用法及代碼示例
- Python test.support.check_impl_detail用法及代碼示例
- Python test.support.captured_stdin用法及代碼示例
- Python test.support.import_helper.import_fresh_module用法及代碼示例
- Python test.support.check__all__用法及代碼示例
- Python test.support.threading_helper.catch_threading_exception用法及代碼示例
- Python test.support.warnings_helper.check_warnings用法及代碼示例
- Python numpy testing.decorators.slow用法及代碼示例
- Python numpy testing.decorators.setastest用法及代碼示例
- Python tesnsorflow.grad_pass_through()用法及代碼示例
- Python textwrap.indent用法及代碼示例
- Python tensorflow.eye()用法及代碼示例
- Python tensorflow.fill()用法及代碼示例
- Python tensorflow.math.special.dawsn()用法及代碼示例
- Python tensorflow.ensure_shape()用法及代碼示例
- Python tensorflow.math.special.fresnel_cos()用法及代碼示例
- Python tensorflow.raw_ops.Cos()用法及代碼示例
- Python tensorflow.get_logger()用法及代碼示例
- Python tensorflow.math.sqrt()用法及代碼示例
- Python tensorflow.math.atanh()用法及代碼示例
注:本文由純淨天空篩選整理自python.org大神的英文原創作品 test.support.load_package_tests。非經特殊聲明,原始代碼版權歸原作者所有,本譯文未經允許或授權,請勿轉載或複製。