How to write unit tests in distutils ?

Hi, I would like to implement some unit tests for the code I am producing for scons support. As the numpy unit test is part of distutils, there is a bootstrap problem, and I am not sure I understand how current unit tests work in distutils: can anyone enlighten me on this one ? cheers, David

David Cournapeau <david@ar.media.kyoto-u.ac.jp> writes:
Hi,
I would like to implement some unit tests for the code I am producing for scons support. As the numpy unit test is part of distutils, there is a bootstrap problem, and I am not sure I understand how current unit tests work in distutils: can anyone enlighten me on this one ?
You'd probably have better luck running them separately from the numpy unittests. e.g, 'import numpy.distutils; numpy.distutils.test()'. Numpy will have to be installed to do so (as opposed to running from the source directory). Installing numpy before running the tests is good practice, anyways. -- |>|\/|< /------------------------------------------------------------------\ |David M. Cooke http://arbutus.physics.mcmaster.ca/dmc/ |cookedm@physics.mcmaster.ca

David M. Cooke wrote:
David Cournapeau <david@ar.media.kyoto-u.ac.jp> writes:
Hi,
I would like to implement some unit tests for the code I am producing for scons support. As the numpy unit test is part of distutils, there is a bootstrap problem, and I am not sure I understand how current unit tests work in distutils: can anyone enlighten me on this one ?
You'd probably have better luck running them separately from the numpy unittests. e.g, 'import numpy.distutils; numpy.distutils.test()'. Numpy will have to be installed to do so (as opposed to running from the source directory). Installing numpy before running the tests is good practice, anyways.
Ok, I will do that, then. Thanks, David
participants (2)
-
cookedm@physics.mcmaster.ca
-
David Cournapeau