[Code] openid library unit tests

Will Norris will at willnorris.com
Sat Jul 17 21:14:44 UTC 2010


On Sat, Jul 17, 2010 at 1:39 PM, Will Norris <will at willnorris.com> wrote:

> I'm working on getting the PHP[0] and Python[1] libraries into a state
> where it is a bit easier to accept patches from individuals.  One of the key
> things to make this possible is ensuring that patches don't break existing
> unit tests, and that new unit tests are written and added when appropriate.
> I've been working on the PHP library for a few weeks now... Luke Shepard
> updated the library to use a more recent version of PHPUnit some time
> ago[2], but the work was never finished.  As it is right now, the tests are
> completely broken.  I've been working on refactoring all of the tests to be
> more in line with the conventions that the latest version of PHPUnit uses.
> I've made good progress, but it is a slow and arduous process.  If anyone is
> interested in helping, then I can see about pushing what I've got up to
> github, which should give you a good idea of what kind of changes need to be
> made.
>
> I'm also looking at the python library, except that I don't have near the
> experience with the python unittest framework.  Simply checking out the
> library and running admin/runtests only got so far.  It started failing on
> django related tests.  I installed django 1.1.1, and the tests got a bit
> farther, but failed again.  Before I spend much time debugging this, I
> wanted to check and see if anyone has the python tests running properly in
> their environment, and if you would mind writing up how to get them
> running.  What modules do you need, what versions, what commands need to be
> run, etc?
>
> While the openid libraries have really good in-line documentation, they're
> a bit lacking in other areas.  I'd like to have a clear guide for people
> interested in submitting patches that instruct them on what they need to do:
>

just to better qualify this statement, there actually was good documentation
for contributing to the libraries, but it was hosted on
openidenabled.comwhich no longer exists.  Plus it was specific to
darcs, so needed to be
rewritten anyway:

http://web.archive.org/web/20080620171411/http://openidenabled.com/contribute/

It would be nice to get content like this back online somewhere for the
libraries... I think the easiest approach would be to use the github wiki,
or a jekyll based site using http://openid.github.com/.  In any event, we
need the content first, and can later figure out where to host it.



>  - checkout the code
>  - make sure the unit tests run
>  - if you're patching a bug, write a new test for it
>  - fix the bug
>  - make sure all unit tests run
>  - send pull request
>
> ... or whatever.  I don't mind doing the work, though it will happen as I
> have time for it (long flights seem to work well :) ).  But it would be
> great if someone more familiar with Python could help write a how-to to at
> least get the tests running.  And of course, doing this for ruby would be
> good too, but I have even less experience with that.
>
> thanks,
> will
>
>
> [0]: http://github.com/openid/php-openid
> [1]: http://github.com/openid/python-openid
> [2]:
> http://github.com/openid/php-openid/commit/ae52c6b3a3b9741c0ef60b6c91ba27af1d85eab7
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openid.net/pipermail/openid-code/attachments/20100717/6999b644/attachment.html>


More information about the Code mailing list