1
我試圖獲得testfixtures測試與pytest傳球,但部分測試模塊的使用old pattern定義一個名爲test_suite函數,返回測試:pytest在定義時如何讓pytest尊重test_suite()?
def test_suite():
return TestSuite((
DocTestSuite(setUp=setUp, tearDown=tearDown),
makeSuite(LogCaptureTests),
))
當pytest嘗試收集到了這一點,它失敗並投訴:
WC1 /Users/chris/vcs/git/testfixtures/testfixtures/tests/test_logcapture.py cannot collect test class 'TestSuite' because it has a __init__ constructor
我怎樣才能得到它來收集測試呢?
恐怕這些都不是文檔測試:http://pythonhosted.org/manuel/ –
也許是寫一個pytest插件'manuel'的好時機。 – wim