小编MrT*_*ime的帖子

如何在Powershell控制台中删除环境前缀

有谁知道如何删除 Powershell 终端窗口中显示的 (venv) 前缀?我知道这纯粹是装饰性的,但我很想将其删除,因为我正在使用 Oh My Posh。

我已附上屏幕截图。在此输入图像描述

terminal powershell oh-my-posh

7
推荐指数
1
解决办法
1241
查看次数

在pytest中设置动态文件夹和报告名称

我在 Python 的 pytest 中动态设置报告名称和文件夹时遇到问题。例如:我已经在 2020-03-06 21:50 运行了所有 pytest 的测试,所以我想将我的报告存储在20200306name 的文件夹中report_2150.html。我希望它在测试完成后立即自动化并触发。

我在 VS Code 中工作,我的目标是与没有自动化经验的同事分享我的工作,所以我的目标是将其用作“单击测试开始”。

我的项目结构:

webtools/
|?? .vscode/
|???? settings.json
|?? drivers/
|?? pages/
|?? reports/
|?? tests/
|???? __init__.py
|???? config.json
|???? conftest.py
|???? test_1.py
|???? test_2.py
|?? setup.py
Run Code Online (Sandbox Code Playgroud)

代码示例:

settings.json

webtools/
|?? .vscode/
|???? settings.json
|?? drivers/
|?? pages/
|?? reports/
|?? tests/
|???? __init__.py
|???? config.json
|???? conftest.py
|???? test_1.py
|???? test_2.py
|?? setup.py
Run Code Online (Sandbox Code Playgroud)

config.json

{
    "python.linting.pylintEnabled": false,
    "python.linting.flake8Enabled": true,
    "python.linting.enabled": true, …
Run Code Online (Sandbox Code Playgroud)

python pytest python-3.x pytest-html

4
推荐指数
1
解决办法
1206
查看次数