Is it possible to run a specified script before any commit in Pycharm/Intellij Idea? I want to make sure that tests are not broken. Thanks.
Asked
Active
Viewed 7,593 times
3 Answers
4
If you don't want to buy a TeamCity licence, you can also use the "toggle auto-test" feature that re-runs your tests whenever you change them.
It does not block your commits but warns you when you have a failed test.

Vincent J
- 4,968
- 4
- 40
- 50
2
I was looking for a similar quick solution, I integrated test execution before launch project execution adding a item in Run/Debug configuration - Before launch
Another best solution is integrate a git hook client like pre-commit

Francisco Rodeño Sanchez
- 607
- 1
- 9
- 15
1
Consider using TeamCity:
Note that it also provides integration with IntelliJ IDEA.

CrazyCoder
- 389,263
- 172
- 990
- 904
-
Thanks, I'll try to setup team city for my project. – dbf Dec 27 '12 at 22:05
-
This doesn't really answer the question, which is how to enable this in PyCharm/IDEA. – quantoid May 01 '19 at 04:29