Re: [Pyobjc-dev] Testing
Brought to you by:
ronaldoussoren
From: <bb...@ma...> - 2002-10-30 22:17:44
|
On Wednesday, October 30, 2002, at 02:10 PM, Ronald Oussoren wrote: .... > The reason for responding in this thread: Is it correct to place the > code above (including the class definitions) in a testcase? E.g. > > class TestSubclassing (unittest.TestCase): > def testSubSubClass(self): > # Code from above Yes -- the code listed above is, in and of itself, the actual test case and, therefore, should be encapsulated in a test case such that it fails [outside of the regular parse errors] in the context of a test case. I had a look at the code and added a test to ensure that a call to super works. I also made a handful of other minor adjustments. All of this should make support for GnuStep *a lot* easier to pull together as GnuStep includes an implementation of the Foundation classes. The tests also make for a very simple and concise place for folks new to the bridge to see the various features that it implements. Of course, for truly frightening testing potential, we could also use doctest.... b.bum |