PyCharm - 每次保存文件时运行相应的单元测试 [英] PyCharm - run a corresponding unit test each time a file is saved

查看:600
本文介绍了PyCharm - 每次保存文件时运行相应的单元测试的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我刚刚切换到使用PyCharm作为我的主要Python编辑器,我很想知道如何配置它以便每次保存文件时都会运行与修改后的文件对应的单元测试? (在浏览文档之后,我还没有找到关于如何做到这一点的明确解释)

I have just switched over to using PyCharm as my primary Python editor, and am curious to know how I can configure it so that every time I save a file, that the unit-test corresponding to the modified file will be run? (after poking around the documentation, I have not found a clear explanation of how to do this)

推荐答案

你可以试试文件监视器插件执行文件修改任务。

You can try File Watchers plugin to execute task on files modification.

示例配置:

example config:

这篇关于PyCharm - 每次保存文件时运行相应的单元测试的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆