本文整理汇总了Python中pyinstruments.curvestore.models.CurveDB.set_root_curve方法的典型用法代码示例。如果您正苦于以下问题:Python CurveDB.set_root_curve方法的具体用法?Python CurveDB.set_root_curve怎么用?Python CurveDB.set_root_curve使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类pyinstruments.curvestore.models.CurveDB
的用法示例。
在下文中一共展示了CurveDB.set_root_curve方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: tearDown
# 需要导入模块: from pyinstruments.curvestore.models import CurveDB [as 别名]
# 或者: from pyinstruments.curvestore.models.CurveDB import set_root_curve [as 别名]
def tearDown(self):
"""
delete all files in tests/temp_files such that they are not synchronized by git
"""
super(TestCurvestore, self).tearDown()
models.MEDIA_ROOT = self.old_media_root
settings.MEDIA_ROOT = self.old_media_root
shutil.rmtree(self.new_media_root)
CurveDB.set_root_curve(self.rootcurve)
示例2: setUp
# 需要导入模块: from pyinstruments.curvestore.models import CurveDB [as 别名]
# 或者: from pyinstruments.curvestore.models.CurveDB import set_root_curve [as 别名]
def setUp(self):
"""
Sets the file folder to tests/temp_files to not add data files in teh normal file
system tree
"""
super(TestCurvestore, self).setUp()
if not osp.exists(self.new_media_root):
os.mkdir(self.new_media_root)
models.MEDIA_ROOT = self.new_media_root
settings.MEDIA_ROOT = self.new_media_root
self.rootcurve = CurveDB.get_root_curve()
CurveDB.set_root_curve(None)
示例3: set_as_root
# 需要导入模块: from pyinstruments.curvestore.models import CurveDB [as 别名]
# 或者: from pyinstruments.curvestore.models.CurveDB import set_root_curve [as 别名]
def set_as_root(dummy, curves=curves):
CurveDB.set_root_curve(curves[0])