当前位置: 首页>>代码示例>>Python>>正文


Python TestCase.tearDown方法代码示例

本文整理汇总了Python中common.TestCase.tearDown方法的典型用法代码示例。如果您正苦于以下问题:Python TestCase.tearDown方法的具体用法?Python TestCase.tearDown怎么用?Python TestCase.tearDown使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在common.TestCase的用法示例。


在下文中一共展示了TestCase.tearDown方法的13个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。

示例1: tearDown

# 需要导入模块: from common import TestCase [as 别名]
# 或者: from common.TestCase import tearDown [as 别名]
 def tearDown(self):
     self.pipeline.setState(STATE_NULL)
     self.pipeline.release()
     self.monitor.disconnectFromObj(self.pipeline)
     del self.pipeline
     del self.monitor
     TestCase.tearDown(self)
开发者ID:bemasc,项目名称:pitivi,代码行数:9,代码来源:test_pipeline.py

示例2: tearDown

# 需要导入模块: from common import TestCase [as 别名]
# 或者: from common.TestCase import tearDown [as 别名]
 def tearDown(self):
     # FIXME: wait for state change thread to settle down
     while self.bin.__gstrefcount__ > 1:
         time.sleep(0.1)
     self.assertEquals(self.bin.__gstrefcount__, 1)
     del self.bin
     TestCase.tearDown(self)
开发者ID:jayridge,项目名称:gst-python,代码行数:9,代码来源:test_bin.py

示例3: tearDown

# 需要导入模块: from common import TestCase [as 别名]
# 或者: from common.TestCase import tearDown [as 别名]
 def tearDown(self):
     self.assertEquals(sys.getrefcount(self.src), pygobject_2_13 and 2 or 3)
     self.assertEquals(self.src.__gstrefcount__, 1)
     del self.src
     self.assertEquals(sys.getrefcount(self.sink), pygobject_2_13 and 2 or 3)
     self.assertEquals(self.sink.__gstrefcount__, 1)
     del self.sink
     TestCase.tearDown(self)
开发者ID:alessandrod,项目名称:gst-python,代码行数:10,代码来源:test_pad.py

示例4: tearDown

# 需要导入模块: from common import TestCase [as 别名]
# 或者: from common.TestCase import tearDown [as 别名]
 def tearDown(self):
     self.discoverer.disconnect_by_function(self.discoveryErrorCb)
     self.discoverer.disconnect_by_function(self.discoveryDoneCb)
     self.discoverer = None
     self.factories = None
     self.error = None
     self.src = None
     TestCase.tearDown(self)
开发者ID:dparker18,项目名称:Pitivi,代码行数:10,代码来源:test_discoverer.py

示例5: tearDown

# 需要导入模块: from common import TestCase [as 别名]
# 或者: from common.TestCase import tearDown [as 别名]
 def tearDown(self):
     self.pipeline.set_state(gst.STATE_NULL)
     self.sink.disconnect(self.sigid)
     if os.path.exists(self.filename):
         os.remove(self.filename)
     del self.bus
     del self.pipeline
     del self.source
     del self.sink
     del self.handoffs
     TestCase.tearDown(self)
开发者ID:ChinnaSuhas,项目名称:ossbuild,代码行数:13,代码来源:test_event.py

示例6: tearDown

# 需要导入模块: from common import TestCase [as 别名]
# 或者: from common.TestCase import tearDown [as 别名]
    def tearDown(self):
        gst.info("tearDown")
        self.assertTrue (self.pipeline.__gstrefcount__ >= 1 and self.pipeline.__gstrefcount__ <= 2)
        self.assertEquals(sys.getrefcount(self.pipeline), pygobject_2_13 and 2 or 3)
        self.assertEquals(self.src.__gstrefcount__, 2)
        self.assertEquals(sys.getrefcount(self.src), pygobject_2_13 and 2 or 3)
        self.assertEquals(self.sink.__gstrefcount__, 2)
        self.assertEquals(sys.getrefcount(self.sink), 3)
        gst.debug('deleting pipeline')
        del self.pipeline
        self.gccollect()

        self.assertEquals(self.src.__gstrefcount__, 1) # parent gone
        self.assertEquals(self.sink.__gstrefcount__, 1) # parent gone
        self.assertEquals(sys.getrefcount(self.src), pygobject_2_13 and 2 or 3)
        self.assertEquals(sys.getrefcount(self.sink), pygobject_2_13 and 2 or 3)
        gst.debug('deleting src')
        del self.src
        self.gccollect()
        gst.debug('deleting sink')
        del self.sink
        self.gccollect()

        TestCase.tearDown(self)
开发者ID:ChinnaSuhas,项目名称:ossbuild,代码行数:26,代码来源:test_ghostpad.py

示例7: tearDown

# 需要导入模块: from common import TestCase [as 别名]
# 或者: from common.TestCase import tearDown [as 别名]
 def tearDown(self):
     del self.pipeline
     del self.element
     TestCase.tearDown(self)
开发者ID:ChinnaSuhas,项目名称:ossbuild,代码行数:6,代码来源:test_element.py

示例8: tearDown

# 需要导入模块: from common import TestCase [as 别名]
# 或者: from common.TestCase import tearDown [as 别名]
 def tearDown(self):
     self.audiosettings = None
     self.videosettings = None
     TestCase.tearDown(self)
开发者ID:dparker18,项目名称:Pitivi,代码行数:6,代码来源:test_encode.py

示例9: tearDown

# 需要导入模块: from common import TestCase [as 别名]
# 或者: from common.TestCase import tearDown [as 别名]
 def tearDown(self):
     self.stream = None
     self.factory = None
     self.monitor = None
     TestCase.tearDown(self)
开发者ID:dparker18,项目名称:Pitivi,代码行数:7,代码来源:test_factories_base.py

示例10: tearDown

# 需要导入模块: from common import TestCase [as 别名]
# 或者: from common.TestCase import tearDown [as 别名]
 def tearDown(self):
     del self.mixer
     TestCase.tearDown(self)
开发者ID:zsx,项目名称:ossbuild,代码行数:5,代码来源:test_interface.py

示例11: tearDown

# 需要导入模块: from common import TestCase [as 别名]
# 或者: from common.TestCase import tearDown [as 别名]
 def tearDown(self):
     self.monitor = None
     self.track_object.release()
     self.track_oject = None
     self.factory = None
     TestCase.tearDown(self)
开发者ID:Mathieu69,项目名称:Pitivi_Gargamel,代码行数:8,代码来源:test_track.py

示例12: tearDown

# 需要导入模块: from common import TestCase [as 别名]
# 或者: from common.TestCase import tearDown [as 别名]
 def tearDown(self):
     self.adapter = None
     TestCase.tearDown(self)
开发者ID:GStreamer,项目名称:gst-python,代码行数:5,代码来源:test_adapter.py

示例13: tearDown

# 需要导入模块: from common import TestCase [as 别名]
# 或者: from common.TestCase import tearDown [as 别名]
 def tearDown(self):
     del self.factory
     TestCase.tearDown(self)
开发者ID:dparker18,项目名称:Pitivi,代码行数:5,代码来源:test_factories_operation.py


注:本文中的common.TestCase.tearDown方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。