> trying to learn something about unit testing python software...

Cool.

>    [EMAIL PROTECTED] /data3/gump/gump-install]$ export \
>      PYTHONPATH=/data3/gump/gump-install/python/
>    [EMAIL PROTECTED] /data3/gump/gump-install]$ sh gumpytest.sh
>
> (...)
>
>    INFO:gump:Performed [29] tests with [15] issues.
>
> I tried running this as ajack too, which resulted in
>
>    INFO:gump:Performed [66] tests with [1] issues.

As :

    http://wiki.apache.org/gump/GumpDevelopment

You might wish to try more directly with PYTHONPATH set, and CWD as gump's
python directory.
    python gump/test/pyunit.py

You can pass wildcarded arguments, e.g.

    python gump/test/pyunit.py *Properties*

> yet the output included lots of statements like
>
>    ERROR:gump:Failed to download [http://no_such_url_to_test_missing].
>    Details: [Errno socket error] (-2, 'Name or service not known')

> * Is this to be expected?

Yeah, I tried unit testing bad situation ('cos we hope we don't see them too
often in live metadata). I didn't find a way to tell the log not to report
them, they were only testing, so you see this.

> * How am I supposed to run these tests on my local machine?

The way you did was created so this could occur:

    http://lsd.student.utwente.nl/gump/gump/gump-test.html

I'd hand run the script.

> * Do I need a profile or anything like that set up?

It is trying to use a test one in gump/test/resources/...

> * Are there fancy python equivalents to stuff like junitreport and
>    clover for python?

No clue. It was only after I hacked gump.test.pyunit.py that I learned a
real pyunit exists. I've not had chance to go investigate it. I think it is
time to move from 'roll your own' to 'install Python packages' approach.
It'll slow Gump installation down, but is better for it's development, I
feel. [i.e. maybe we ought remove logging from gump/python, since it is in
Python 2.3 and can be downloaded for Python 2.2. I just hadn't wanted to
face that on all machines yet.]

> * Are there docs that answer these Qs somewhere?

Not really. We ought cut-n-paste them to:

        http://wiki.apache.org/gump/GumpDevelopment

regards

Adam


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to