[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
- To: pygame-users@xxxxxxxx
- Subject: [pygame] new dev tool... test/util/compare_docs.py | also gen_stubs.py
- From: René Dudfield <renesd@xxxxxxxxx>
- Date: Sun, 29 Mar 2009 15:54:23 +1100
- Delivered-to: archiver@xxxxxxxx
- Delivered-to: pygame-users-outgoing@xxxxxxxx
- Delivered-to: pygame-users@xxxxxxxx
- Delivery-date: Sun, 29 Mar 2009 00:54:26 -0400
- Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:date:message-id:subject :from:to:content-type; bh=0CzyM/aX2aCgIb9KicKqgUTOf7JY0lApaJ3zYlrU0C8=; b=Gir9JPu732u6By30lKwF5mXMt78Kn1TUHDOCN9YnoWsY/xUf0CU27KkNShD/e+hY23 tPFdjhZ8lTtBd4GlMFFuotz3+wVnrcPsA0tG3Xz3pXeaz2SQ2wD40lQAapLQImwNLf0J bF2q6AABcNjO2TNcfRxT8yBP1U8EmEiAvgoP8=
- Domainkey-signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:date:message-id:subject:from:to:content-type; b=JDSP8hxvromu+7Pt8Nqjz4sxv7IYURWte41nY8bnlxy/9BnI/axk/cMpxb9LewDurf ZmjXFt3ozqxEHwownIzYcg9DUfPBZ28aMVEjc+ADRV1QFOqpgi3AFD1COFs+nFGZylEh cyozDXaYVeNiKsMPI6hChgZC5r1SgERP6yv6k=
- Reply-to: pygame-users@xxxxxxxx
- Sender: owner-pygame-users@xxxxxxxx
hey,
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.
------------------
gen_stubs.py
-------------------
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/
Usage:
$ python gen_stubs.py ROOT
eg.
$ gen_stubs.py sprite.Sprite
def test_add(self):
# Doc string for pygame.sprite.Sprite:
...
Options:
-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
cheers,