0
Q
根据平台跳过测试
A
回答
0
显然,你做它像这样
第一步,创建一个装饰
def skip_if(condition):
"""Conditionally skips a test"""
def wrapper(f):
f.__test__ = not condition
return f
return wrapper
第二步,在你的病情使用sys.platform
import sys
@skip_if(sys.platform != "linux")
def test_linux_only()
linus_torvalds()
相关问题
- 1. 根据参数跳过一些测试
- 2. 试图根据条件循环跳过测试用例
- 3. Verilog测试平台
- 4. SIP测试平台
- 5. Gradle跳过测试
- 6. 如何根据条件自动跳过某些JUnit测试?
- 7. 根据自定义Java注释JUnit4跳过测试
- 8. 测试上Vaadin与测试平台
- 9. 在Firefox 3.6中测试(测试平台?)
- 10. 在elisp中测试平台?
- 11. Verilog测试平台实现
- 12. VHDL - 测试平台 - 泛型
- 13. Verilog测试平台代码
- 14. 在线测试平台
- 15. 在Qunit中跳过测试
- 16. GoogleTest:如何跳过测试?
- 17. 跳过单元测试-Arcanist
- 18. PHPUnit跳过所有测试
- 19. 测试在pytest中跳过
- 20. 在Jenkins中跳过测试
- 21. 在Grails中跳过测试
- 22. Maven自动跳过测试
- 23. 跳过TestWatcher的测试
- 24. 如何跳过测试Nightwatch.js?
- 25. 为.NET选择测试平台--MbUnit还是Microsoft的测试平台?
- 26. 错误时,试图做测试平台
- 27. GAE - 如何在测试平台中使用blobstore存根?
- 28. 2D平台AI跳转
- 29. 平台中性单元测试?
- 30. 测试平台多种架构