Re: [Pyobjc-dev] Testing
Brought to you by:
ronaldoussoren
|
From: Ronald O. <ous...@ci...> - 2002-10-30 19:10:57
|
If just added Lib/objc/test/test_subclass.py to test some (actually 1)
feature of subclassing Objective-C classes. It should be possible to do
something like the code below, but that crashes the interpreter. I've
also checked in a fix for this bug.
NSObject = objc.lookup_class('NSObject')
class LevelOneClass (NSObject): pass
class LevelTwoClass (Level1Class): pass
v = LevelTwoClass.alloc().init()
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
Ronald
|