It's a project that's no much worth, but might be a bit handy. In fact, I haven't even been clever enough to have the idea myself: it was Jeff Winkler who gave it a kick at the first place.
When you are using TDD methodology, here is how a coding session works. You add a test case to your tests, you launch them, they fail - or not, but usually, they must fail - and you start coding, you look for a solution, and then you run your tests until the test pass. Rince, repeat, until it's ok.
The boring bit is sometimes the manual switch from your editor to a system shell to run your tests, and watch the result, and back on your editor again, and again, yadayada...
Start of a solution
The nosy.py script by Jeff Winkler is quite a start. It's a program that builds a list of files within a project (a directory), and as soon as one of them is modified, it runs
. You have to know that nosetests is a python tool that runs every test it finds in a Python project. Very very very handy...
Someone (like me) who uses Django has to run a different program. Because running nosetests may not work properly. In Django, you run:
$ python manage.py test
Then I tried to build a more flexible
and allow more than one test program, as the user wants it.
So, this "test daemon" code bit is available via github. Once git is installed, you may grab it like:
$ git clone email@example.com:brunobord/tdaemon.git
The important file is
. You may want to make it executable and accessible from your path and run it that way (for example):
$ python /path/o/tdaemon.py /path/to/project/
By default, tdaemon uses nosetests, but you can use
or the django test tool. I didn't try it, but I'm almost sure you can use any other test tool, once it would be implemented in the script.
Of course, I'm keeping an open eye on any kind of improvement you may want to bring in it, or report any bug, etc. This is just a bit of code, far from being perfect, but it works (for me, at least).
(as we are talking about that, I'm trying to use
a bit more often and I hope this project may help me in mastering this DCVS - and github services, too. My brain is more easy with the
logic, and I can't quite get my head around
at the moment)