当前位置: 首页>>代码示例>>Python>>正文


Python Model.loadBookmark方法代码示例

本文整理汇总了Python中model.Model.loadBookmark方法的典型用法代码示例。如果您正苦于以下问题:Python Model.loadBookmark方法的具体用法?Python Model.loadBookmark怎么用?Python Model.loadBookmark使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在model.Model的用法示例。


在下文中一共展示了Model.loadBookmark方法的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。

示例1: test_loading_book_mark_good

# 需要导入模块: from model import Model [as 别名]
# 或者: from model.Model import loadBookmark [as 别名]
 def test_loading_book_mark_good(self):
     model = Model()
     
     self.assertEqual(model.getStatus(), State.NO_OPEN_FILE)        
     model.loadBookmark(os.getcwd() + "\\bookmarks.html")
     self.assertEqual(model.getStatus(), State.FILE_OPENED)
     self.assertEqual(model.numberOfVideos(), 3)
开发者ID:satbirkira,项目名称:eyb-dl-gui,代码行数:9,代码来源:model-tests.py

示例2: test_benchmark_model_bookmark_regex

# 需要导入模块: from model import Model [as 别名]
# 或者: from model.Model import loadBookmark [as 别名]
 def test_benchmark_model_bookmark_regex(self):
     #just curious how long this takes
     model = Model()  
     start = time()
     clock()
     model.loadBookmark(os.getcwd() + "\\test-files\\bookmark_1k_bomb.html")
     seconds = time() - start
     print("Loading Bookmark Files Took:", clock(), "Cycles. Seconds:", seconds)
开发者ID:satbirkira,项目名称:eyb-dl-gui,代码行数:10,代码来源:model-tests.py

示例3: test_loading_book_mark_bad

# 需要导入模块: from model import Model [as 别名]
# 或者: from model.Model import loadBookmark [as 别名]
 def test_loading_book_mark_bad(self):
     model = Model()
     
     #test to make sure that if the file does not exist, the state
     #is still NO_OPEN_FILE. We don't check if its EMPTY_FILE since
     #that is just a flag state for the UI to display a error dialog box
     #and instantly changes back to NO_OPEN_FILE after the UI has been informed.
     self.assertEqual(model.getStatus(), State.NO_OPEN_FILE)
     model.loadBookmark("")
     self.assertEqual(model.getStatus(), State.NO_OPEN_FILE)
     self.assertEqual(model.numberOfVideos(), 0)
开发者ID:satbirkira,项目名称:eyb-dl-gui,代码行数:13,代码来源:model-tests.py

示例4: test_video_skip

# 需要导入模块: from model import Model [as 别名]
# 或者: from model.Model import loadBookmark [as 别名]
 def test_video_skip(self):
     model = Model()
    
     model.loadBookmark(os.getcwd() + "\\bookmarks.html")
     #test skipping
     self.assertEqual(model.videoStatus(0), videoState.QUEUED)
     model.removeItemFromList(0)
     self.assertEqual(model.videoStatus(0), videoState.SKIPPED)
     model.queueItemFromList(0)
     self.assertEqual(model.videoStatus(0), videoState.QUEUED)
     #test cancelling
     model.changeVideoStatus(0, videoState.DOWNLOADING)
     model.removeItemFromList(0)
     self.assertEqual(model.videoStatus(0), videoState.CANCELLED)
     #queueing this should not work, should stay canceled
     model.queueItemFromList(0)
     self.assertEqual(model.videoStatus(0), videoState.CANCELLED)
开发者ID:satbirkira,项目名称:eyb-dl-gui,代码行数:19,代码来源:model-tests.py

示例5: test_using_youtube_title_if_non_bookmark

# 需要导入模块: from model import Model [as 别名]
# 或者: from model.Model import loadBookmark [as 别名]
 def test_using_youtube_title_if_non_bookmark(self):
     model = Model()
     model.loadBookmark(os.getcwd() + "\\youtube-videos.txt")
     self.assertEqual(model.output_title_format, titleFormat.USE_YOUTUBE_TITLE)   
开发者ID:satbirkira,项目名称:eyb-dl-gui,代码行数:6,代码来源:model-tests.py


注:本文中的model.Model.loadBookmark方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。