标签: python ruby unit-testing rspec pytest
我是从红宝石到蟒蛇。使用ruby的rspec,我习惯使用skip和pending来表示应该跳过/当前无法执行的测试。
skip
pending
Python中有哪些等价物?
答案 0 :(得分:2)
Python的pytest允许:
pytest
Skipping test functions,例如:
pytest.skip("unsupported configuration")
xfail for tests which are expected to fail,例如:
xfail
pytest.xfail("waiting for foo to be fixed")