Hi,
I am getting into troubles when using numpy.testing with coverage. A
minimal example package is atached to this email. Unpack and run:

$ python -c "import mypackage; mypackage.test(verbose=10,coverage=False)"
$ python -c "import mypackage; mypackage.test(verbose=10,coverage=True)"

Some explanations:
This package contains two module files, one of them (b.py) defining a
class (mycls), the other one (a.py) importing the first module. I then
add a simple test file, that does instantiate the class through the
other module (a.py) and checking the type of the resulting object
against b.mycls
Without coverage, everything is ok. With coverage, I got a
(unexpected ?) reload of the modules, leading to a mismatch of types...

The real case is somewhat more complicated, and I would prefer to keep
the instantiation through a.py. Is there a way to solve the problem ?

Best regards

-- 
Fabrice Silva <si...@lma.cnrs-mrs.fr>
LMA UPR CNRS 7051

Attachment: mypackage.tar
Description: Unix tar archive

_______________________________________________
NumPy-Discussion mailing list
NumPy-Discussion@scipy.org
http://mail.scipy.org/mailman/listinfo/numpy-discussion

Reply via email to