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


Python Model.getStatus方法代码示例

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


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

示例1: test_loading_book_mark_good

# 需要导入模块: from model import Model [as 别名]
# 或者: from model.Model import getStatus [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_loading_book_mark_bad

# 需要导入模块: from model import Model [as 别名]
# 或者: from model.Model import getStatus [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

示例3: test_correct_bounding_setters

# 需要导入模块: from model import Model [as 别名]
# 或者: from model.Model import getStatus [as 别名]
    def test_correct_bounding_setters(self):
        model = Model()

        original_OutputFormat = model.getOutputFormat()
        original_OutputTitleFormat = model.getOutputTitleFormat()
        original_getOutputQuality = model.getOutputQuality()
        original_Status = model.getStatus()

        #try to set value to one that is not defined as a constant
        model.setOutputFormat(-1)
        model.setOutputTitleFormat(-1)
        model.setOutputQuality(-1)
        model.setStatus(-1)

        self.assertEqual(model.getOutputFormat(), original_OutputFormat)
        self.assertEqual(model.getOutputTitleFormat(), original_OutputTitleFormat)
        self.assertEqual(model.getOutputQuality(), original_getOutputQuality)
        self.assertEqual(model.getStatus(), original_Status)
开发者ID:satbirkira,项目名称:eyb-dl-gui,代码行数:20,代码来源:model-tests.py

示例4: test_gets_and_sets

# 需要导入模块: from model import Model [as 别名]
# 或者: from model.Model import getStatus [as 别名]
    def test_gets_and_sets(self):
        model = Model()
        
        model.setFilePath("C:\bookmark.html")
        model.setOutputPath("C:\downloads")
        model.setOutputFormat(Format.WAV)
        model.setOutputTitleFormat(titleFormat.USE_YOUTUBE_TITLE)
        model.setOutputQuality(Quality.HIGH)
        model.setStatus(State.OPENING_FILE)

        self.assertEqual(model.getFilePath(), "C:\bookmark.html")
        self.assertEqual(model.getOutputPath(), "C:\downloads")
        self.assertEqual(model.getOutputFormat(), Format.WAV)
        self.assertEqual(model.getOutputTitleFormat(), titleFormat.USE_YOUTUBE_TITLE)
        self.assertEqual(model.getOutputQuality(), Quality.HIGH)
        self.assertEqual(model.getStatus(), State.OPENING_FILE)
开发者ID:satbirkira,项目名称:eyb-dl-gui,代码行数:18,代码来源:model-tests.py

示例5: test_updating_try_downloading

# 需要导入模块: from model import Model [as 别名]
# 或者: from model.Model import getStatus [as 别名]
 def test_updating_try_downloading(self):
     model = Model()
     model.setStatus(State.UPDATING)
     model.startDownloading()
     self.assertEqual(model.getStatus(), State.UPDATING)
开发者ID:satbirkira,项目名称:eyb-dl-gui,代码行数:7,代码来源:model-tests.py


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