本文整理汇总了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)
示例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)
示例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)
示例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)
示例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)