[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]

[pygame] new dev tool... test/util/compare_docs.py | also gen_stubs.py


I wrote this little tool for find out what is documented in a module and what isn't.

So you can do this:

$ cd test/util/
$ python compare_docs.py pygame.sprite sprite.doc

Then it prints out what is not documented.  It also prints out if there are docs for something that doesn't exist.

It searches for .doc files in lib/*.doc and then src/*.doc.

Also of note, in case you missed it...  another tool from a while ago.

This time for generating empty test cases (Nicholas wrote it).  

It's nice if you've got a module already, and need to write some tests for it.

$ cd test/util/

$ python gen_stubs.py ROOT


$ gen_stubs.py sprite.Sprite

def test_add(self):

    # Doc string for pygame.sprite.Sprite:


  -h, --help        show this help message and exit
  -l, --list        list callable names not stubs
  -t, --test_names  list test names not stubs
  -d, --docs        get (more detailed) docs using makeref.py