Python Forum

Full Version: Testing library
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Hello!
1. What is a test framework that you use?
2. I want a framework with
a) Continuous running. Like I just run:
Quote:$ tests run
and it should run tests again and again, when files are changed. It's a common thing for node.js.

b) I want to divide all tests on several groups: small/middle/big and be able to point to a runner, which group should be started.
How can I achieve this?

Thank you very much!
Let me answer one of my questions on my own:

Q: How to run tests automatically when any file is changed?
A: There's a beautiful watchdog module, that allows us to listen to File System events programmatically. It also has a shell interface and so can type:

 watchmedo shell-command --recursive --pattern="*.py" --command='python -m unittest' .
I don't know the exact testing command yet, so the question is still opened :) I don't want to run all the test, I want to run only mini-tests.
(Jan-28-2018, 01:04 AM)egslava Wrote: [ -> ]1. What is a test framework that you use?
pytest is the best and most pythonic framework out there.