本文簡要介紹 python 語言中 numpy.testing.dec.slow
的用法。
用法:
testing.dec.slow(t)
-
將測試標記為‘slow’。
慢速測試的確切定義顯然是主觀的和hardware-dependent,但通常任何需要超過一兩秒的單獨測試都應標記為慢速(整個套件由數千個測試組成,所以即使一秒鍾也是重大)。
- t: 可調用的
標記為慢的測試。
- t: 可調用的
裝飾測試 t。
參數:
返回:
例子:
numpy.testing
模塊包括import decorators as dec
。測試可以像這樣緩慢地裝飾:from numpy.testing import * @dec.slow def test_big(self): print('Big, slow test')
相關用法
- Python numpy dec.setastest用法及代碼示例
- Python numpy delete用法及代碼示例
- Python numpy degrees用法及代碼示例
- Python numpy deprecate用法及代碼示例
- Python numpy deg2rad用法及代碼示例
- Python numpy dtype.isbuiltin用法及代碼示例
- Python numpy dtype.shape用法及代碼示例
- Python numpy dtype.ndim用法及代碼示例
- Python numpy dtype.alignment用法及代碼示例
- Python numpy diagonal用法及代碼示例
- Python numpy dtype用法及代碼示例
- Python numpy dtype.names用法及代碼示例
- Python numpy dtype.__class_getitem__用法及代碼示例
- Python numpy divmod用法及代碼示例
- Python numpy dtype.flags用法及代碼示例
- Python numpy diagflat用法及代碼示例
- Python numpy dtype.fields用法及代碼示例
- Python numpy dtype.subdtype用法及代碼示例
- Python numpy dtype.descr用法及代碼示例
- Python numpy datetime_as_string用法及代碼示例
- Python numpy divide用法及代碼示例
- Python numpy dtype.kind用法及代碼示例
- Python numpy dtype.metadata用法及代碼示例
- Python numpy diag用法及代碼示例
- Python numpy dsplit用法及代碼示例
注:本文由純淨天空篩選整理自numpy.org大神的英文原創作品 numpy.testing.dec.slow。非經特殊聲明,原始代碼版權歸原作者所有,本譯文未經允許或授權,請勿轉載或複製。