Linux Archive

Linux Archive (http://www.linux-archive.org/)
-   Ubuntu Server Development (http://www.linux-archive.org/ubuntu-server-development/)
-   -   Location for unittests - was: add couple of tests and support for them (http://www.linux-archive.org/ubuntu-server-development/692546-location-unittests-add-couple-tests-support-them.html)

Martin Sivak 08-10-2012 08:52 AM

Location for unittests - was: add couple of tests and support for them
 
Hi,

> Could you add all tests into the top-level tests/ directory? I don't
> really like mixing tests and code into the same structure.

This is for longer discussion. I don't like navigating separate (and different) directory structure to find the file with the proper unittest to modify.

And since nobody was maintaining the tests we did with tmlcoch, I think having the tests for file.py in file_test.py makes people realize they should take a look at that file when the code is updated or moved somewhere.

Test execution is handled by python-nose and it doesn't care about where the file is. On the other hand, importing the file under test is much much easier this way (it won't import all the package inits along the way, which is good - unittests are about unit isolation).

Packaging is still OK as we can do rm *_test.py* in the install phase.

David asked me to take care about the unittesting infrastructure and this is my proposal.

Martin

_______________________________________________
Anaconda-devel-list mailing list
Anaconda-devel-list@redhat.com
https://www.redhat.com/mailman/listinfo/anaconda-devel-list


All times are GMT. The time now is 05:39 AM.

VBulletin, Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO ©2007, Crawlability, Inc.