[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]
Re: [pygame] TODO: add pygame unittests, and test runner stuff to pygame.test package.
- To: pygame-users@xxxxxxxx
- Subject: Re: [pygame] TODO: add pygame unittests, and test runner stuff to pygame.test package.
- From: Nicholas Dudfield <ndudfield@xxxxxxxxx>
- Date: Mon, 15 Sep 2008 15:52:04 +1000
- Delivered-to: archiver@xxxxxxxx
- Delivered-to: pygame-users-outgoing@xxxxxxxx
- Delivered-to: pygame-users@xxxxxxxx
- Delivery-date: Mon, 15 Sep 2008 01:52:32 -0400
- Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:message-id:date:from :user-agent:mime-version:to:subject:references:in-reply-to :content-type:content-transfer-encoding; bh=z4E8rLUGLd8i6Sw2FrHm6TJV+/r5+76Y37nVut7hcao=; b=GbtfFgutVD7ldCJ4KzoWoPmpI1lAdB3U+FJcKHmK0CJFg40YWkGTJiIGq2BxFnkSnw WiDRdNHsvswEtpb2z63kJNraLlC1Mmu2Y753IsnNJA7lgxZJTZ2Sjwc2MneKlFNu/588 +P79XO7SZtbmCJZb1SLmfUVLJvtRIN41Uk584=
- Domainkey-signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=message-id:date:from:user-agent:mime-version:to:subject:references :in-reply-to:content-type:content-transfer-encoding; b=e8rxZRcLnle31fiOK7iFxb0AEjZLnaLalKlKBuyZD5KFKwqWrSzJGSQ0Nw9C6o6XiH zu9OEo3VOgMD24a44JQcae3XkHSthyuiCRgt1lUiNvu4gvbXgrhAPtoZrEFVtfRPxIWL QeX7JsS10dOiGB/F6ImvOZsXrprd0mdcRgLOQ=
- In-reply-to: <64ddb72c0809130149l5759c5c7l2f5f8fcc83b1e471@xxxxxxxxxxxxxx>
- References: <64ddb72c0809130149l5759c5c7l2f5f8fcc83b1e471@xxxxxxxxxxxxxx>
- Reply-to: pygame-users@xxxxxxxx
- Sender: owner-pygame-users@xxxxxxxx
- User-agent: Thunderbird 2.0.0.16 (Windows/20080708)
Jotted down some thoughts.
Overview
========
Modifying Installer:
pygame.tests
pygame.examples
build manifest
Build Script
Test Hub Web App
Whats the point
===============
How many developers out there use PyGame? How large a percentage of those
developers have commit rights? Of those who don't, how many when
discovering a
bug have the time and inclination to go through the process of getting a
patch
commited and writing a test for it?
So we have people with no commit rights communicating with those who do, who
finally have to verify the patch/test and merge it in.
Those with commit rights, volunteers all, have other demands on their
time and
some times it takes a while for this process to complete. Patchers can be
discouraged by this.
How to grease the wheels here?
What information is usually provided from patcher to commiter?
* patch
* platform
* build info
* proof of existing bug --> test code
What would an ideal process look like? How to enable it?
Ideally, pygame would contain a build manifest somewhere, so the
communication
of platform + build info could be automated.
For proof of existing bugs, if the test code was in the form of a
unittest this
would be ideal.
During the GSOC I created a unittest stub generator, that would create the
skeleton code for a test. It also includes in the comments the
documentation for
the callable being tested, sourced both from the __doc__ strings and the DOC
files. (The __doc__s tends to be short, containing only function
signatures and
the makeref contains more extensive documentation)
eg gen_stubs sprite.Sprite >> stub.py
(DOC FILES WOULD NEED TO BE INCLUDED FOR GEN STUBS AS PART OF PACKAGE?)
Having the very latest documentation available in the test code is handy
so you
can determine whether the function or the documentation is buggy as well as
being very convenient in general while writing tests.
********************************************************************************
* End Users / Developers / Commiters *
*****************************************
It is possible in this context to categorize users of pygame into:
* End Users
People who download a game.
* Stable version developers.
Developers who are working from "installers" eg stable versions of
pygame.
* SVN Developers
All of these people can be assumed to have a subversion
checkout of the
source.
* Commiters
Commit Rights - Duh!
What does that imply?
Py2Exe
======
Running tests from py2exe builds?
Subprocessed tests? How? Dependency on win32pipe for async_sub.py?
(subprocesses are killed after 30 seconds)
Build Info
==========
I modified Brian's build page script to collect build information during the
build + meta info (build script configuration info)
http://pygame-testify.net/results/py25_exe/1642/setup
If each "stable installer" could include something similar that could be
useful.
Build Script
============
A build script that dumps output and records build information could be
handy
for debugging builds by making it easier to communicate build information.
POSTing Tests
=============
If there was a pygame.test package that any "End User" could use to post
test
results + build manifest, that could be useful.
Things that must stay the same
==============================
* Conveniently run tests from the trunk dir eg run_tests.py
* Must not have to rebuild/reinstall pygame each time running new
tests
>>> development_of_tests == PITA == no_tests_written
True
Things to consider
==================
* Adding size to the installer
What is __too__ much size? The tests tend to use a lot of the
data from
the examples directory for fixtures. So these will by necessity
have to
be provided.
What will be included
=====================
Test Runner
Unit Tests
Test Fixtures
Examples
Stub Generator (DOCS?)
Test POSTer
Keep build information/manifest in the installer so can post a long the
details.
Test Hub
========
Where to POST the results to? How to view the results? A web interface.
################################################################################
# Conclusion #
##############
Ideas needs further fleshing out, thinking through.
Modifying Installer
pygame.tests
pygame.examples
build manifest
Build Script
Test Hub Web App