本文整理汇总了Python中utilities.testBase.testSetup函数的典型用法代码示例。如果您正苦于以下问题:Python testSetup函数的具体用法?Python testSetup怎么用?Python testSetup使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了testSetup函数的6个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的Python代码示例。
示例1: _go
def _go(self):
fl = FeedLoader()
fl.go()
fl.closeDB()
if not runStatus.run:
return
cl = ContentLoader()
cl.go()
cl.closeDB()
if __name__ == "__main__":
import utilities.testBase as tb
with tb.testSetup():
# run = Runner()
# run.go()
runStatus.run = True
cl = ContentLoader()
cl.go()
cl.closeDB()
# cl = ContentLoader()
# pg = 'http://www.twistedhelscans.com/read/trace_15/en/0/33/page/1'
# pg = 'http://www.twistedhelscans.com/read/trace_15/en/0/32/'
# cl.getImageUrls(pg)
开发者ID:nothing628,项目名称:MangaCMS,代码行数:30,代码来源:TwistedHelRun.py
示例2: Runner
from ScrapePlugins.NHentaiLoader.DbLoader import DbLoader
from ScrapePlugins.NHentaiLoader.ContentLoader import ContentLoader
import runStatus
import ScrapePlugins.RunBase
class Runner(ScrapePlugins.RunBase.ScraperBase):
loggerPath = "Main.Manga.NHentai.Run"
pluginName = "NHentai"
sourceName = "NHentai"
feedLoader = DbLoader
contentLoader = ContentLoader
if __name__ == "__main__":
import utilities.testBase as tb
with tb.testSetup(startObservers=False):
run = Runner()
run.go()
开发者ID:GJdan,项目名称:MangaCMS,代码行数:25,代码来源:Run.py
示例3: loggerPath
@abc.abstractmethod
def loggerPath(self):
return None
def __init__(self):
self.db = db
self.log = logging.getLogger("Main.Trigger."+self.loggerPath)
self.log.info("Loading %s Runner", self.pluginName)
def _go(self):
self.log.info("Checking %s for updates", self.pluginName)
self.go()
self.log.info("Update check for %s finished.", self.pluginName)
if __name__ == "__main__":
import utilities.testBase as tb
with tb.testSetup(startObservers=True):
run = Runner()
run.go()
开发者ID:GodOfConquest,项目名称:ReadableWebProxy,代码行数:29,代码来源:TriggerBase.py
示例4: test
def test():
import utilities.testBase as tb
with tb.testSetup(startObservers=False):
run = Runner()
run.go()
开发者ID:MyAnimeDays,项目名称:MangaCMS,代码行数:6,代码来源:Run.py
示例5: getHistory
items = self.loadFeed(pageOverride)
ret = []
for feedEntry in items:
item = {}
try:
item["dlName"] = feedEntry["name"]
item["contentID"] = feedEntry["token"]
item["date"] = calendar.timegm(parser.parse( feedEntry["date"]).utctimetuple())
#self.log.info("date = ", feedEntry['published_parsed'])
item['retreivalTime'] = time.time()
ret.append(item)
except:
self.log.info("WAT?")
traceback.print_exc()
return ret
if __name__ == "__main__":
import utilities.testBase as tb
with tb.testSetup(load=False):
# getHistory()
run = DjMoeDbLoader()
# run.getFeed()
run.go()
开发者ID:GDXN,项目名称:MangaCMS,代码行数:29,代码来源:DbLoader.py
示例6: test
def test():
import utilities.testBase as tb
with tb.testSetup():
run = Runner()
run.go()
开发者ID:GDXN,项目名称:MangaCMS,代码行数:6,代码来源:Run.py
注:本文中的utilities.testBase.testSetup函数示例由纯净天空整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论