本文整理汇总了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)
示例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)
示例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)
示例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)
示例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)
示例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)
示例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)
示例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)
示例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)
示例10: tearDown
# 需要导入模块: from common import TestCase [as 别名]
# 或者: from common.TestCase import tearDown [as 别名]
def tearDown(self):
del self.mixer
TestCase.tearDown(self)
示例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)
示例12: tearDown
# 需要导入模块: from common import TestCase [as 别名]
# 或者: from common.TestCase import tearDown [as 别名]
def tearDown(self):
self.adapter = None
TestCase.tearDown(self)
示例13: tearDown
# 需要导入模块: from common import TestCase [as 别名]
# 或者: from common.TestCase import tearDown [as 别名]
def tearDown(self):
del self.factory
TestCase.tearDown(self)