elixir - 将 ExUnit 中的测试标记为待处理
问题描述
我正在寻找一种将用 ExUnit 编写的测试标记为待处理的方法。
我知道我可以通过标签跳过测试,但是我正在寻找一种跳过测试的方法,这种方式可以高度透明地显示这些测试已被跳过,因为它们需要被实现。其他测试框架如 RSpec 或 ESpec 将这些标记为黄色并在每次运行时突出显示它们。
ExUnit中有这样的功能吗?
解决方案
@tag :skip
test "this is my pending test"
这将导致:
mix test
.......................................................**
Finished in 0.1 seconds (0.00s async, 0.1s sync)
57 tests, 0 failures, 2 skipped
推荐阅读
- python - tensorflow 的 reduce_mean() 给出一个近似值(不是精确值)
- qt - Qt:在保留孩子的同时删除父小部件?
- c# - C# MS Access 中具有多个内部联接的查询表达式中的语法错误(缺少运算符)
- android - UDP 多播在 Dart(Linux) 中正常工作,但在 Flutter(Android Emulator) 中不能正常工作
- c# - 光子螺栓 | 编译程序集给出错误
- django - Django Forms如何在ModelForm中访问当前请求用户?
- javascript - 我的 Axios 响应拦截器失败了?
- javascript - Hyperledger Fabric javascript 链码读取瞬态数据
- docker - 为什么 Synology docker 容器无法 ping 其主机 IP?
- swiftui - 在合并中的发布者列表上报告进度