This repository has been archived by the owner on Mar 25, 2021. It is now read-only.
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
4 changed files
with
25 additions
and
0 deletions.
There are no files selected for viewing
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
|
||
# [PyCharm]pytest设置和使用 | ||
|
||
`PyTest`使用参考[pytest](https://zj-image-processing.readthedocs.io/zh_CN/latest/python/pytest/) | ||
|
||
## 设置 | ||
|
||
点击`菜单栏 -> File -> Settings`,选择`Tools->Python Integrated Tools`,在`Testing`选项中选择`pytest` | ||
|
||
![](./imgs/pycharm-pytest-setting.png) | ||
|
||
## 使用 | ||
|
||
编辑测试文件后,在编辑区域右键选择`Run "pytest for xxx"` | ||
|
||
如果不存在,需要额外创建运行配置,点击`Edit Configuration` | ||
|
||
![](./imgs/pycharm-run-configuration.png) | ||
|
||
点击左上角`+`符号,创建一个新的配置 | ||
|
||
1. 选择`pytest`作为执行命令 | ||
2. 选择要执行的文件路径 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters