腾讯云
开发者社区
文档
建议反馈
控制台
登录/注册
首页
学习
活动
专区
圈层
工具
MCP广场
文章/答案/技术大牛
搜索
搜索
关闭
发布
文章
问答
(9999+)
视频
沙龙
1
回答
如何
使用
pytest
运行
python
的
跟踪
?
python
、
pytest
、
trace
、
bin
我正在尝试对
使用
pytest
执行
的
程序
运行
跟踪
。我正在尝试命令但它给了我正如我假设
的
那样,trace.py正在等待一个文件。我看到了这个
浏览 6
提问于2020-02-25
得票数 2
4
回答
ModuleNotFoundError:没有名为“
pytest
”
的
模块
python
、
pytest
在虚拟环境中安装
pytest
模块之后,我
使用
python
代码调用并
运行
提示来查找
pytest
模块。 assert 5!=5
pytest
.main()
运行
python
-u "d
浏览 5
提问于2019-04-12
得票数 30
1
回答
Python
: ImportError:没有名为_pluggy
的
模块
python
、
python-2.7
、
pytest
、
pytest-cov
在
使用
pytest
运行
测试时,我会得到ImportError: No module named _pluggy错误。 pluggy
浏览 4
提问于2017-12-19
得票数 7
回答已采纳
1
回答
Visual Studio代码调试器中
的
文档测试
python
、
visual-studio-code
、
pytest
、
docstring
、
doctest
pytest
foo.py --doctest-modules -v来
运行
doctest。相反,我希望能够通过Visual代码
的
内置调试器对其进行测试,以
跟踪
变量和调用堆栈。在我
的
项目的launch.json中有以下配置"type": "
python
","sto
浏览 0
提问于2018-07-05
得票数 11
4
回答
如何
在不同版本
的
python
上
运行
py.test?
python
、
pytest
可以在没有插件(如xdist)或tox
的
不同版本
的
python
中
运行
py.test吗
浏览 4
提问于2011-12-01
得票数 25
1
回答
我可以修补
Python
的
断言以获得py.test提供
的
输出吗?
python
、
python-3.x
、
debugging
、
pytest
、
assert
Pytest
对于失败断言
的
输出比
Python
中
的
默认输出信息更丰富,也更有用。我想在正常
运行
Python
程序时利用这一点,而不仅仅是在执行测试时。是否有方法从我
的
脚本中覆盖
Python
的
assert行为来
使用
pytest
来打印堆栈
跟踪
,同时仍然以
python
script/
pytest
_assert.py
的
形式
浏览 0
提问于2018-08-14
得票数 5
回答已采纳
1
回答
如何
使用
选项从命令行
运行
模块?
python
、
pytest
python
中
的
模块可以从管道中
运行
。这
使用
了
的
优点来
运行
pytest
。现在,我想
使用
pytest
选项
运行
-verbose,但是在它周围加上引号/滴答不起作用:
python
-m "
pytest
-ve
浏览 5
提问于2021-01-06
得票数 0
回答已采纳
2
回答
Pytest
-3.3.2
使用
python
2.7
ubuntu
、
pytest
、
windows-subsystem-for-linux
我刚刚安装了Ubuntu for WSL,主要是为了能够在学习
python
编码
的
同时
使用
linux命令,特别是git和
pytest
。我
使用
bash shell安装了
pytest
,尽管我安装了
python
3.7,但在
运行
pytest
时,它
使用
的
是
python
2.7:当从windows
浏览 0
提问于2018-11-11
得票数 0
1
回答
我们
如何
分析每个芹菜任务
的
内存
使用
情况?
python
、
celery
、
pytest
、
memory-profiling
我
使用
pytest
运行
测试,而
pytest
又
运行
几个芹菜任务。但是,当我
使用
我无法
跟踪
在celery worker中
运行
的
每个celery任务所消耗
的
内存。我可以看到py.test进程消耗了50MB
的
内存(我可以在mprof图中看到),而芹菜工人消耗了大约600-700MB
的
内存,mprof
浏览 5
提问于2020-05-21
得票数 1
1
回答
运行
脚本时出现
的
pycharm错误
python
、
unit-testing
我正在尝试
使用
py魅力
运行
脚本,并得到了以下错误: File "/Applications/PyCharm.app/Contents/plugins/
python
/helpers/pycharm/_jb_
pytest
_runner.py", line 5, in <module> F
浏览 8
提问于2022-06-10
得票数 -2
回答已采纳
2
回答
使用
Pytest
的
Github操作
python
、
python-3.x
、
github
、
github-actions
我收到找不到
pytest
命令
的
错误。下面是我
的
动作文件。我正在
使用
pipfile.lock安装依赖项。: actions/checkout@v2 uses: actions/setup-
python
@v1 - name: Install dependencies <em
浏览 0
提问于2020-02-19
得票数 3
1
回答
pipenv
pytest
忽略源更改还是
使用
缓存
的
源?
python-3.x
、
django
、
pytest
、
pipenv
我有一个Django 4.0.6项目,
Python
3.9.15,Ubuntu 22.10,pipenv 2022.10.25,
pytest
7.1.2
运行
测试:pipenv run
pytest
src/some/path/models.pyThe测试失败,显示方法主体traceback.Modify中
的
正确错误。再次
运行
测试。测试再次失败,但是
跟踪
显示
浏览 5
提问于2022-11-13
得票数 1
2
回答
没有输出,即使
使用
`py.test -s`
python
、
python-2.7
、
pytest
、
xdist
、
python-hunter
我想
使用
py.test与相结合不幸
的
是,猎人
的
输出(
跟踪
)是不可见
的
。/local/lib/
python
2.7/site-packages/
pytest
.pyc
pytest
浏览 3
提问于2019-02-14
得票数 10
回答已采纳
1
回答
Pytest
不能与
python
3一起
运行
python-3.x
、
pytest
我用ubuntu安装
的
pytest
不是用
python
3
运行
的
,而是用
python
2.7安装
的
。
如何
在
运行
pytest
时切换到
python
3?
python
3 -m
pytest
.是有效
的
,但它不是一个选项,因为
运行
我
的
测试
的
程序
使用
pytest
...
浏览 16
提问于2020-10-08
得票数 0
回答已采纳
1
回答
pytest
.fixture函数不能
使用
“收益率”。相反,编写并返回一个内部函数/生成器,让
使用
者调用并遍历它。
selenium
、
pytest-django
我正试图为Django项目
使用
pytest
运行
selenium,并执行安装/解锁。我试图
使用
跟踪
最好
的
yield,但是我得到了一个错误:
pytest
.fixture functions cannot随后,我
使用
了另一种
运行
良好
的
代码。关于版本
的
说明:$
浏览 14
提问于2017-03-04
得票数 5
回答已采纳
4
回答
'py.test‘未被识别为内部或外部命令、可操作程序或批处理文件
python
、
pytest
、
pep8
我最近开始学习
python
,我知道我
的
问题可能并不复杂。我从我
的
Windows cmd发出以下命令来安装
pytest
框架及其所需
的
依赖项然后发布:py -3 -m pip install
pytest
-pep8要安装pep8插件和必需
的
依赖项,请执行以下操作。但是当我想要通过py.test --pep8 exp1.py命令
运行
pytest
时,我得到了提到<em
浏览 4
提问于2020-09-14
得票数 2
1
回答
如何
配置
pytest
以引发/触发BytesWarning?
python
、
pytest
也许我这样做是错误
的
,因为我
的
搜索没有发现任何有用
的
东西。每当发生隐式字节到字符串或字节到int转换时,在调用
python
解释器时添加将发出警告(引发): 当将字节或字节数组与str或字节与int进行比较时,发出警告。我想用
pytest
编写一个单元测试。当我将上面的测试称为
python
-bb -m
pytest
foo.py时,它将通过,因为BytesWarning是作为异常引发
的
。到目前一切尚好。我无法解决
的
问题(我似乎也无法在
浏览 7
提问于2022-01-20
得票数 0
回答已采纳
12
回答
未找到Py.test命令,但已安装了库
terminal
、
command
、
pip
、
pytest
关于这个主题,已经有两篇关于堆栈溢出
的
文章;但是,它们都没有解决或解决我
的
具体情况。有人知道我为什么不能在终端机上
使用
这个命令吗?编辑:它甚至显示为已安装
的
包:cycler (0.9.0) matplotlib (1.5
浏览 13
提问于2016-03-14
得票数 60
回答已采纳
4
回答
如何
在PyScripter中
运行
Py.test
python
、
pytest
、
pyscripter
我是py.test
的
新手,请让我知道
如何
在PyScripter编辑器中
运行
py.test。我试过以下两种方法,但不起作用。导入
pytest
def test_answer():断言== (3)def 5在
运行
上面的脚本时,我得到一个错误消息: File "C:\
Python
27\lib\site-packages\
pytest</em
浏览 2
提问于2012-11-14
得票数 3
回答已采纳
1
回答
如何
添加一个脚本任务来
运行
竹子中
的
pytest
python
、
pytest
、
bamboo
我正在
使用
竹子设置一个构建配置,这是我第一次
使用
该工具。代码签出和构建步骤已经完成,现在我想添加测试步骤。我尝试添加脚本
python
-m
pytest
tests/* 但我得到了 /usr/bin/
python
: No module named
pytest
添加
pytest
步骤
的
正确方法是什么
浏览 8
提问于2019-07-01
得票数 1
点击加载更多
热门
标签
更多标签
云服务器
ICP备案
实时音视频
对象存储
即时通信 IM
活动推荐
运营活动
广告
关闭
领券