本文整理汇总了Python中sumatra.projects.Project.delete_record方法的典型用法代码示例。如果您正苦于以下问题:Python Project.delete_record方法的具体用法?Python Project.delete_record怎么用?Python Project.delete_record使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类sumatra.projects.Project
的用法示例。
在下文中一共展示了Project.delete_record方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: delete_record__should_update_most_recent
# 需要导入模块: from sumatra.projects import Project [as 别名]
# 或者: from sumatra.projects.Project import delete_record [as 别名]
def delete_record__should_update_most_recent(self):
"""see ticket:36."""
proj = Project("test_project",
record_store=MockRecordStore())
proj.add_record(MockRecord("record1"))
self.assertEqual(proj._most_recent, "record1")
proj.add_record(MockRecord("record2"))
self.assertEqual(proj._most_recent, "record2")
proj.delete_record("record2")
self.assertEqual(proj._most_recent, "last") # should really be "record1", but we are not testing RecordStore here
示例2: test__delete_record__calls_delete_on_the_record_store
# 需要导入模块: from sumatra.projects import Project [as 别名]
# 或者: from sumatra.projects.Project import delete_record [as 别名]
def test__delete_record__calls_delete_on_the_record_store(self):
proj = Project("test_project",
record_store=MockRecordStore())
proj.delete_record("foo")
self.assertEqual(proj.record_store.deleted, "foo")