コード例 #1
0
ファイル: testOpLabelVolume.py プロジェクト: syaffa/ilastik
            r = weakref.ref(op)
            del op
            gc.collect()
            ref = r()
            if ref is not None:
                for i, o in enumerate(gc.get_referrers(ref)):
                    print("Object", i, ":", type(o), ":", o)

            assert r(
            ) is None, "OpBlockedArrayCache was not cleaned up correctly"
        finally:
            cacheMemoryManager.enable()


if haveBlocked():

    class TestBlocked(TestVigra):
        def setup_method(self, method):
            self.method = np.asarray(["blocked"], dtype=np.object)

        # @unittest.skip("Not implemented yet")
        # def testUnsupported(self):
        # pass

        # background value is unsupported for blocked labeling
        @unittest.expectedFailure
        def testBackground(self):
            super(TestBlocked, self).testBackground()

コード例 #2
0
ファイル: testOpLabelVolume.py プロジェクト: CVML/lazyflow
            r = weakref.ref(op)
            del op
            gc.collect()
            ref = r()
            if ref is not None:
                for i, o in enumerate(gc.get_referrers(ref)):
                    print "Object", i, ":", type(o), ":", o

            assert r() is None, "OpBlockedArrayCache was not cleaned up correctly"
        finally:
            CacheMemoryManager().enable()



if haveBlocked():
    class TestBlocked(TestVigra):

        def setUp(self):
            self.method = np.asarray(['blocked'], dtype=np.object)

        #@unittest.skip("Not implemented yet")
        #def testUnsupported(self):
            #pass

        # background value is unsupported for blocked labeling
        @unittest.expectedFailure
        def testBackground(self):
            super(TestBlocked, self).testBackground()