[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]
[pygame] unit and doc testing questions
- To: pygame-users@xxxxxxxx
- Subject: [pygame] unit and doc testing questions
- From: "Jake b" <ninmonkeys@xxxxxxxxx>
- Date: Tue, 13 Jan 2009 06:44:10 -0600
- Delivered-to: archiver@xxxxxxxx
- Delivered-to: pygame-users-outgoing@xxxxxxxx
- Delivered-to: pygame-users@xxxxxxxx
- Delivery-date: Tue, 13 Jan 2009 07:44:12 -0500
- Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:message-id:date:from:to :subject:mime-version:content-type; bh=AzDUvPqA8os6FUvQKESCen3uXigrHnhjVzgHgRVwo7s=; b=EuUnUCJvRPx7a1ZMNuHrzGCj7uZ6rACNMklTO04eNgPNOAiDUZA4cPprrOl0seDn2j KQWR1muuHSAy8PTW34R6ks3YGZDJsWmCZpLQnbYMENYyUb/mHPPKXgCjm5SLS+DDU7sG CbkzHc68PSI1d+IOkMT/AwDvdEnmHDpqlX7ro=
- Domainkey-signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=message-id:date:from:to:subject:mime-version:content-type; b=WR1pRvhS8VZrMu+LkscpJwElgug8JbSJ/GpbnpJ42qDP75gcsSdmZm8TGTQRwDKXVU BFPsRALmaEuE8atwl21I342BTfmhAcHBNn5Gg+ALtvcDzEvtGXh9yMw9mODsFMcJz/D4 YcEkmkfcGUUK0h9N/XZ4h3tJakmiuAwcXfHXs=
- Reply-to: pygame-users@xxxxxxxx
- Sender: owner-pygame-users@xxxxxxxx
I'm learning about doctest, and unittests. Now if I create a file, like pygame/test/rect_test.py , is there and easy way to import the project in its parent directory?
I thought "import ../mymodule" might work, ( but at least not in 2.5 ). Then I got it to work appending sys.path.
==
1) What is your advice on imports from test files? ( Do you append your sys.path, or something else? )
2) Do you have two seperate unittests ? (A) One is ran every time source files are compiled, and a second, (B) slower one is ran at a longer interval for slow tests ?
3) Other advice relating to testing ?
thanks,
--
Jake