本文整理匯總了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")