[Chicago] Running tests automatically with Unitttest...

Chris Foresman foresmac at gmail.com
Fri Feb 27 00:41:11 CET 2015


Yeah, that does seem like overkill to me, too. But really what you need is some daemon process that would monitor your project folder and any folders inside it and then runs `python manage.py test`; you could probably do that with Automator, TBH.

We run tests manually in the local environment then trigger the test suite automatically when we open a pull request in Github. That’s probably a more common set up if you ask around.



Chris Foresman
chris at chrisforesman.com



> On Feb 26, 2015, at 5:34 PM, Brian Ray <brianhray at gmail.com> wrote:
> 
> The tricky part is watching for changes, right?  
> 
> I don't have an answer; however, looking at the autoreload.py might give you some ideas: https://github.com/django/django/blob/2ee9bce654f940a8de5ef121f39b6fcb6d09741a/django/utils/autoreload.py <https://github.com/django/django/blob/2ee9bce654f940a8de5ef121f39b6fcb6d09741a/django/utils/autoreload.py>
> 
> Within it uses pyinotify, which may also give you some ideas. 
> 
> However, do you really want to re-run all the tests every time you change a file? Sounds like that may be overkill?
> 
> 
> On Thu, Feb 26, 2015 at 4:08 PM, Malcolm Newsome <malcolm.newsome at gmail.com <mailto:malcolm.newsome at gmail.com>> wrote:
> 
> Hey all,
> 
> I recently picked up working with Django again and am using the default unittest.
> 
> I'm wondering if anyone has any suggestions on a good test runner--that watches the files for changes and reruns tests automatically (similar to Guard for Ruby/Rspec).  I did try several Google searches...but was unable to find what I was looking for.
> 
> Thanks!
> 
> Malcolm
> 
> 
> 
> _______________________________________________
> Chicago mailing list
> Chicago at python.org <mailto:Chicago at python.org>
> https://mail.python.org/mailman/listinfo/chicago <https://mail.python.org/mailman/listinfo/chicago>
> 
> 
> 
> 
> -- 
> Brian Ray 
> @brianray
> (773) 669-7717
> _______________________________________________
> Chicago mailing list
> Chicago at python.org
> https://mail.python.org/mailman/listinfo/chicago

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/chicago/attachments/20150226/5b9ef557/attachment.html>


More information about the Chicago mailing list