Pytest加载项,用于显示失败的整个节点ID

pytest-wholenodeid的Python项目详细描述


pytest wholenodeid

pytest wholenodeid将在 头球。

它会变成这样:

=============================================== FAILURES ===============================================
______________________________ TriggerRuleMatchTests.test_match_locale _________________________________
Traceback (most recent call last):
  File "/home/willkg/mozilla/fjord/fjord/suggest/providers/trigger/tests/test_models.py", line 24, in test_match_locale
    for tr_locales, feedback_locale, expected in tests:
NameError: global name 'tests' is not defined

进入这个:

=============================================== FAILURES ===============================================
____ fjord/suggest/providers/trigger/tests/test_models.py::TriggerRuleMatchTests::test_match_locale ____
Traceback (most recent call last):
  File "/home/willkg/mozilla/fjord/fjord/suggest/providers/trigger/tests/test_models.py", line 24, in test_match_locale
    for tr_locales, feedback_locale, expected in tests:
NameError: global name 'tests' is not defined

为什么?

因为这样可以更容易地复制和粘贴头中的节点id 运行特定的测试。

快速启动

安装:

$ pip install pytest-wholenodeid

它默认工作。如果你不想要全名,你可以通过 --nowholenodeid作为参数禁用它。

项目详细信息

Code:https://github.com/willkg/pytest-wholenodeid
Documentation:You’re reading it
Issue tracker:https://github.com/willkg/pytest-wholenodeid/issues
License:Simplified BSD License; see LICENSE file

欢迎加入QQ群-->: 979659372 Python中文网_新手群

推荐PyPI第三方库


热门话题
java Websphere SAAJ版本问题   java素数计算乐趣   多次使用java新线程   java DBUnit引用完整性约束违反一对一关系   java 安卓滑动并避免刷新recyclerview项   java JavaFX画布在StackPane内未正确调整大小   java如何在应用程序中包含大字符串数组资源?   java从(大)文本文件填充JComboBox   java使用带有JFileChooser的自定义文件过滤器   java让Android应用程序与PHP文件通信   javajavax。smartcardio javadocs   我是否可以将Java的BufferedReader与事件侦听器一起使用,而不是while(true)?   maven在Bitbucket管道中集成Java Lombok