Skip to content
This repository has been archived by the owner on Mar 25, 2021. It is now read-only.

Commit

Permalink
docs(pycharm): pytest设置和使用
Browse files Browse the repository at this point in the history
  • Loading branch information
zjZSTU committed Apr 28, 2020
1 parent 4f53447 commit 7b97ee7
Show file tree
Hide file tree
Showing 4 changed files with 25 additions and 0 deletions.
Binary file added docs/jetbrains/imgs/pycharm-pytest-setting.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/jetbrains/imgs/pycharm-run-configuration.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
23 changes: 23 additions & 0 deletions docs/jetbrains/pycharm-pytest设置和使用.md
@@ -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. 选择要执行的文件路径
2 changes: 2 additions & 0 deletions mkdocs.yml
Expand Up @@ -62,6 +62,8 @@ nav:
- CLion:
- 'OpenCV配置': './jetbrains/clion-OpenCV配置.md'
- 'could not load cache': './jetbrains/clion-Error: could not load cache.md'
- PyCharm:
- '[PyCharm]pytest设置和使用': './jetbrains/pycharm-pytest设置和使用.md'
- 'Android Studio':
'安装': './android/android-studio/[Ubuntu]Android Studio安装.md'
'[Ubuntu]启动器制作': './android/android-studio/[Ubuntu]启动器制作.md'
Expand Down

0 comments on commit 7b97ee7

Please sign in to comment.