Example #1
0
    def testClassAndInstance(self):

        # Having the next line true would be nice:
        #self.assertEqual(PyObjC_TestClassAndInstance.isInstance(), objc.NO)
        # But we'll have to settle for this one instead:
        self.assertFalse(PyObjC_TestClassAndInstance.pyobjc_classMethods.isInstance())
        self.assertTrue(PyObjC_TestClassAndInstance.alloc().init().isInstance())
Example #2
0
    def testClassAndInstance(self):

        # Having the next line true would be nice:
        # self.assertEqual(PyObjC_TestClassAndInstance.isInstance(), objc.NO)
        # But we'll have to settle for this one instead:
        self.assertFalse(PyObjC_TestClassAndInstance.pyobjc_classMethods.isInstance())
        self.assertTrue(PyObjC_TestClassAndInstance.alloc().init().isInstance())
Example #3
0
    def testClassAndInstanceWorkaround(self):
        if PyObjC_TestClassAndInstance.pyobjc_classMethods.isInstance():
            self.fail()

        self.assertFalse(
            PyObjC_TestClassAndInstance.pyobjc_classMethods.isInstance())
        self.assertTrue(PyObjC_TestClassAndInstance.alloc().init().
                        pyobjc_instanceMethods.isInstance())
Example #4
0
    def testClassAndInstanceWorkaround(self):
        if PyObjC_TestClassAndInstance.pyobjc_classMethods.isInstance():
            self.fail()

        self.failIf(
            PyObjC_TestClassAndInstance.pyobjc_classMethods.isInstance())
        self.failUnless(PyObjC_TestClassAndInstance.alloc().init().
                        pyobjc_instanceMethods.isInstance())
Example #5
0
    def testClassAndInstanceWorkaround(self):
        if PyObjC_TestClassAndInstance.pyobjc_classMethods.isInstance():
            self.fail()

        self.assertFalse(PyObjC_TestClassAndInstance.pyobjc_classMethods.isInstance())
        self.assertTrue(PyObjC_TestClassAndInstance.alloc().init().pyobjc_instanceMethods.isInstance())
Example #6
0
    def testClassAndInstanceWorkaround(self):
        if PyObjC_TestClassAndInstance.pyobjc_classMethods.isInstance():
            self.fail()

        self.failIf(PyObjC_TestClassAndInstance.pyobjc_classMethods.isInstance())
        self.failUnless(PyObjC_TestClassAndInstance.alloc().init().pyobjc_instanceMethods.isInstance())