本文整理汇总了Python中test.TestUtils.TestUtils.setupLogging方法的典型用法代码示例。如果您正苦于以下问题:Python TestUtils.setupLogging方法的具体用法?Python TestUtils.setupLogging怎么用?Python TestUtils.setupLogging使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类test.TestUtils.TestUtils
的用法示例。
在下文中一共展示了TestUtils.setupLogging方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: MutationFactoryTest
# 需要导入模块: from test.TestUtils import TestUtils [as 别名]
# 或者: from test.TestUtils.TestUtils import setupLogging [as 别名]
import unittest
from oncotator.DuplicateAnnotationException import DuplicateAnnotationException
from oncotator.MutationData import MutationData
from oncotator.MutationDataFactory import MutationDataFactory
from test.TestUtils import TestUtils
TestUtils.setupLogging(__file__, __name__)
class MutationFactoryTest(unittest.TestCase):
_multiprocess_can_split_ = True
def test_annotation_overwriting_on(self):
"""Test that the factory can produce a mutation that allows overwriting. Just need to make sure no exception thrown."""
mdf = MutationDataFactory(allow_overwriting=True)
mut = mdf.create()
mut.createAnnotation("blah", "123")
self.assertTrue(mut['blah'] == "123")
mut.createAnnotation("blah", "456")
self.assertTrue(mut['blah'] == "456")
def test_annotation_overwriting_off(self):
"""Test that the factory can produce a mutation that does not allow overwriting. Make sure DuplicateAnnotationException is thrown."""
mdf = MutationDataFactory(allow_overwriting=False)
mut = mdf.create()
mut.createAnnotation("blah", "123")
self.assertTrue(mut['blah'] == "123")