zoukankan      html  css  js  c++  java
  • pytest安装与报错问题以及PyCharm设置

    pytest和allure都是单元测试框架

    不要点击:https://item.taobao.com/item.htm?id=613711271112

    注意:配置文件不能有中文注释也不行,不然会出错,__init__.py文件不能删除,不然会报错。


    def test_login1(self):
    print("通过")
    assert True

     断言: assert True

    1安装导入运行报错安装:pip3 install -u pytest  (-u表示最新版)还需要安装:pip install -u allure-pytest

    卸载:pip uninstall pytest

    验证:pytest --version

    pytest -s login.py(进入当前文件,执行指定login.py文件)

     验证:

    cmd执行如下命令:

    pip uninstall pytest-allure-adaptor
    pip install allure-pytest

    成功了

    设置测试程序:

    2:

     导入python库。

    去波浪线:

     改字体:

    改变颜色:

    没有不会的技术,只有你想不到的技术。。。。。。。。。。。。。。
  • 相关阅读:
    2016_6_28日报
    2016_6_27日报
    软工总结
    团队项目:第九关攻略
    团队项目:第八关攻略
    团队项目:第七关攻略
    团队项目:第六关攻略
    团队项目:第五关攻略
    团队项目:第三四关攻略
    day5
  • 原文地址:https://www.cnblogs.com/zenghongfei/p/12113011.html
Copyright © 2011-2022 走看看