FAQ Search Today's Posts Mark Forums Read
» Video Reviews

» Linux Archive

Linux-archive is a website aiming to archive linux email lists and to make them easily accessible for linux users/developers.


» Sponsor

» Partners

» Sponsor

Go Back   Linux Archive > Redhat > Fedora Development

 
 
LinkBack Thread Tools
 
Old 10-16-2008, 07:01 PM
Michael DeHaan
 
Default (devel) a note about automated tests and how we're going to do them moving forward

I've switching "make test" to call unit tests via nose, which produces
some nicer output from the same test code.


To get nose, you'll need to:

# yum install nose

Nose can also be called with coverage if you uncomment that part of the
Makefile.


# easy_install coverage

While currently a lot of tests exist in tests/test.py the intent is for
new tests to live with the code, so that they have a greater hope of
being maintained when folks add features (since they will obviously be
in the same file).


For instance, XMLRPC tests will live in remote.py.

Nose allows for tests to be named "test_something" and it will find
functions of that form and see if any asserts in them fail.


For instance:

assert x == 2, "verify that the return code is two"

Another nice feature of nose is that when running "make test" the output
is a lot nicer, it will only show stdout/stderr for tests that actually
fail, so there's a lot less noise to sift through.


--Michael

--
fedora-devel-list mailing list
fedora-devel-list@redhat.com
https://www.redhat.com/mailman/listinfo/fedora-devel-list
 
Old 10-16-2008, 07:09 PM
Jesse Keating
 
Default (devel) a note about automated tests and how we're going to do them moving forward

On Thu, 2008-10-16 at 15:01 -0400, Michael DeHaan wrote:
>
> I've switching "make test" to call unit tests via nose, which
> produces
> some nicer output from the same test code.

Did this go to the wrong list?

--
Jesse Keating
Fedora -- Freedom˛ is a feature!
identi.ca: http://identi.ca/jkeating
--
fedora-devel-list mailing list
fedora-devel-list@redhat.com
https://www.redhat.com/mailman/listinfo/fedora-devel-list
 
Old 10-16-2008, 07:57 PM
Michael DeHaan
 
Default (devel) a note about automated tests and how we're going to do them moving forward

Michael DeHaan wrote:
I've switching "make test" to call unit tests via nose, which produces
some nicer output from the same test code.


To get nose, you'll need to:

# yum install nose

Nose can also be called with coverage if you uncomment that part of
the Makefile.


# easy_install coverage

While currently a lot of tests exist in tests/test.py the intent is
for new tests to live with the code, so that they have a greater hope
of being maintained when folks add features (since they will obviously
be in the same file).
For instance, XMLRPC tests will live in remote.py.


Nose allows for tests to be named "test_something" and it will find
functions of that form and see if any asserts in them fail.


For instance:

assert x == 2, "verify that the return code is two"

Another nice feature of nose is that when running "make test" the
output is a lot nicer, it will only show stdout/stderr for tests that
actually fail, so there's a lot less noise to sift through.


--Michael



Wrong list, grr


--
fedora-devel-list mailing list
fedora-devel-list@redhat.com
https://www.redhat.com/mailman/listinfo/fedora-devel-list
 

Thread Tools




All times are GMT. The time now is 08:50 PM.

VBulletin, Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO ©2007, Crawlability, Inc.
Copyright ©2007 - 2008, www.linux-archive.org