[pygr-notify] Issue 19 in pygr: add pygrtest_common import to all primary tests

codesite-noreply at google.com codesite-noreply at google.com
Sat Jun 21 14:09:03 PDT 2008


Issue 19: add pygrtest_common import to all primary tests
http://code.google.com/p/pygr/issues/detail?id=19

New issue report by ti... at idyll.org:
nolleyal's patch to add pygrtest_common to all primary tests.

pygrtest_common is an import common to the five primary test files
(blast_test, graph_test, nlmsa_test, pygrdata_test, and sequence_test).
It allows stock to be run before (or after) each test.

This is in support of two goals: first, adding code coverage analysis to
the tests; and second, adding an import path requirement.

The first goal is to analyze the code coverage of the current tests over
the pygr code base, in the interests of identifying areas that aren't
executed by the current tests.  Because 'protest' runs each test in its
own process (necessary for some tests, e.g. the pygr.Data tests) we
cannot run figleaf just on protest.py; it needs to be run for each of
the test cases.  We decided the best way to do this was to turn it on in
a common file which is imported by each test module.

Note that pygrtest_common only turns on figleaf code coverage recording
in test modules if it was on in protest.py; this is communicated by
using an environment variable.

The second goal of having a common import was to add an import path
mod & check to make sure that the tests are importing the development
version of pygr.  This removes the need to set PYTHONPATH and also
overcomes problems with some versions of easy_install, where the
installed egg is imported despite PYTHONPATH settings.  It also makes
it possible to "just run" the tests and be fairly confident that the
development tree is the version being tested.

The patch correctly looks for pygr in both the pygr/ directory and the
build/lib.$PLATFORM directory, so you can use either

   python setup.py build_ext -i

or

   python setup.py build

to compile pygr before running the tests.


Attachments:
	0005-nolleyal-s-patch-to-add-pygrtest_common-to-all-prima.patch  5.8 KB


Issue attributes:
	Status: New
	Owner: Acracker
	CC: ti... at idyll.org
	Labels: Type-Patch Priority-Medium

-- 
You received this message because you are listed in the owner
or CC fields of this issue, or because you starred this issue.
You may adjust your issue notification preferences at:
http://code.google.com/hosting/settings



More information about the pygr-notify mailing list