Hello all,
In some spare time, I hacked together an automated test runner that runs all pywikipedia's tests after the last nightly release has been generated, and posts the results online. Currently, most tests seem to be malfunctioning in one way or another, so it needs some work.
The results are available at: http://toolserver.org/~pywikipedia/nightly/testing/test_pywikipedia.txt (and in xunit format, if anyone prefers that).
Best, Merlijn
On 15 January 2012 01:16, Merlijn van Deen valhallasw@arctus.nl wrote:
In some spare time, I hacked together an automated test runner (...)
The results are available at: http://toolserver.org/~pywikipedia/nightly/testing/test_pywikipedia.txt (and in xunit format, if anyone prefers that).
Anyone who checked the output will have noticed there were a lot of tests failing. I fixed this today by removing tests (such as the ones that required user input) or broken code (such as a bit of code from date.py).
In addition, I created a nosetests configuration file, allowing anyone to quickly run tests by typing 'nosetests' in the pwb root directory (you might need to pip install nose first).
As a bonus, we now also have coverage reports - and they are not as bad as I expected! Feel free to browse around http://toolserver.org/~pywikipedia/nightly/testing/coverage/ .
Best, Merlijn
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1
First; I agree with binaris - "nice work!" indeed! thanks for that!
Now the "but" part; could you explain me how to use the 'nosetests' with 'coverage'?
Using 'nosetests' from 'pywikipedia' trunk directory yield 5 times
"ERROR: Failure: AttributeError (StringIO instance has no attribute 'encoding')"
and I was not able to use the coverage and produce e.g. html output...
The reason why I am asking; I would like to understand nose and use it for DrTrigonBot code parts also (in order to adopt to pywikipedia).
Thanks a lot and Greetings DrTrigon
On 21.01.2012 18:33, Merlijn van Deen wrote:
On 15 January 2012 01:16, Merlijn van Deen <valhallasw@arctus.nl mailto:valhallasw@arctus.nl> wrote:
In some spare time, I hacked together an automated test runner (...)
The results are available at: http://toolserver.org/~pywikipedia/nightly/testing/test_pywikipedia.txt (and in xunit format, if anyone prefers that).
Anyone who checked the output will have noticed there were a lot of tests failing. I fixed this today by removing tests (such as the ones that required user input) or broken code (such as a bit of code from date.py).
In addition, I created a nosetests configuration file, allowing anyone to quickly run tests by typing 'nosetests' in the pwb root directory (you might need to pip install nose first).
As a bonus, we now also have coverage reports - and they are not as bad as I expected! Feel free to browse around http://toolserver.org/~pywikipedia/nightly/testing/coverage/ .
Best, Merlijn
_______________________________________________ Pywikipedia-l mailing list Pywikipedia-l@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/pywikipedia-l
On 18 February 2012 11:54, Dr. Trigon dr.trigon@surfeu.ch wrote:
Now the "but" part; could you explain me how to use the 'nosetests' with 'coverage'?
see https://github.com/valhallasw/pywikipedia-nightly-generation/blob/master/tes...
nosetests --with-xunit --xunit-file=../output/xunit_pywikipedia.xml tests 2>> ../output/test_pywikipedia.txt
The reason why I am asking; I would like to understand nose and use
it for DrTrigonBot code parts also (in order to adopt to pywikipedia).
For this, I suggest to read the nosetests / unittest2 manual.
Best, Merlijn
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1
...and http://nedbatchelder.com/code/coverage/ THEN I got it working too! ;)))
Thanks a lot for your help and assistance!! Greetings DrTrigon
On 18.02.2012 14:51, Merlijn van Deen wrote:
On 18 February 2012 11:54, Dr. Trigon <dr.trigon@surfeu.ch mailto:dr.trigon@surfeu.ch> wrote:
Now the "but" part; could you explain me how to use the 'nosetests' with 'coverage'?
see https://github.com/valhallasw/pywikipedia-nightly-generation/blob/master/tes...
nosetests --with-xunit --xunit-file=../output/xunit_pywikipedia.xml tests 2>> ../output/test_pywikipedia.txt
The reason why I am asking; I would like to understand nose and use it for DrTrigonBot code parts also (in order to adopt to pywikipedia).
For this, I suggest to read the nosetests / unittest2 manual.
Best, Merlijn
_______________________________________________ Pywikipedia-l mailing list Pywikipedia-l@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/pywikipedia-l