Re: (devel) a note about automated tests and how we're going to do them moving forward

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/fedora-devel-list

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Fedora Announce]     [Fedora Kernel]     [Fedora Testing]     [Fedora Formulas]     [Fedora PHP Devel]     [Kernel Development]     [Fedora Legacy]     [Fedora Maintainers]     [Fedora Desktop]     [PAM]     [Red Hat Development]     [Gimp]     [Yosemite News]
  Powered by Linux