[转载]pytest报AttributeError: module ‘pytest‘ has no attribute ‘main‘

转自:https://blog.csdn.net/yinying12/article/details/110522989

 

pytest报AttributeError: module ‘pytest‘ has no attribute ‘main‘

桑瑜

于 2020-12-03 11:01:52 发布

2510
收藏
分类专栏: pytest接口自动化 文章标签: python
版权

pytest接口自动化
专栏收录该内容
3 篇文章0 订阅
订阅专栏
pytest报AttributeError: module ‘pytest’ has no attribute ‘main’

 

 

百度了超级多,最后发现原来时文件夹的命名和pytest库的命名相同导致的
解决方法:新建一个文件夹,然后把之前的工程移到这个文件夹中,然后问题解决~
新手就容易犯命名不规范,然后导致各种奇葩的问题
————————————————
版权声明:本文为CSDN博主「桑瑜」的原创文章,遵循CC 4.0 BY-SA版权协议,转载请附上原文出处链接及本声明。
原文链接:https://blog.csdn.net/yinying12/article/details/110522989

posted @ 2022-11-07 10:44  workingdiary  阅读(147)  评论(0编辑  收藏  举报