當前位置: 首頁>>代碼示例>>Python>>正文


Python LOG.warning方法代碼示例

本文整理匯總了Python中atve.log.LOG.warning方法的典型用法代碼示例。如果您正苦於以下問題:Python LOG.warning方法的具體用法?Python LOG.warning怎麽用?Python LOG.warning使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在atve.log.LOG的用法示例。


在下文中一共展示了LOG.warning方法的10個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Python代碼示例。

示例1: test

# 需要導入模塊: from atve.log import LOG [as 別名]
# 或者: from atve.log.LOG import warning [as 別名]
 def test(self):
     try :
         self.assertTrue("atve.browser" in self.service.keys())
         b = self.service["atve.browser"].get("FireFox")
         self.assertTrue(b != None)
         b.start(self.get("browser.url"))
         self.assertTrue(b.find_element_by_id("hplogo") != None)
     except Exception as e:
         L.warning(str(e))
     finally:
         b.quit()
開發者ID:TE-ToshiakiTanaka,項目名稱:atve,代碼行數:13,代碼來源:browser_04.py

示例2: test

# 需要導入模塊: from atve.log import LOG [as 別名]
# 或者: from atve.log.LOG import warning [as 別名]
 def test(self):
     try :
         self.assertTrue("atve.browser" in self.service.keys())
         b = self.service["atve.browser"].get("Chrome")
         self.assertTrue(b != None)
         b.start(self.get("browser.url"))
         self.assertTrue(False)
     except SeleniumError as e:
         L.warning(str(e))
     except Exception as e:
         self.assertTrue(False)
開發者ID:TE-ToshiakiTanaka,項目名稱:atve,代碼行數:13,代碼來源:browser_04_2.py

示例3: rm

# 需要導入模塊: from atve.log import LOG [as 別名]
# 或者: from atve.log.LOG import warning [as 別名]
 def rm(self, filepath):
     if not type(filepath) in STRING_SET:
         raise WorkspaceError("filepath must be strings.")
     if not os.path.exists(filepath):
         L.warning("it is not exists %s" % filepath)
     else:
         try:
             os.remove(filepath)
             return filepath
         except Exception as e:
             L.traceback()
             raise WorkspaceError("Can't remove file %s. Please Check File Permission." % filepath)
開發者ID:TE-ToshiakiTanaka,項目名稱:atve,代碼行數:14,代碼來源:workspace.py

示例4: test

# 需要導入模塊: from atve.log import LOG [as 別名]
# 或者: from atve.log.LOG import warning [as 別名]
 def test(self):
     try :
         self.assertTrue("atve.browser" in self.service.keys())
         b = self.service["atve.browser"].get("FireFox")
         self.assertTrue(b != None)
         b.start(self.get("browser.url"))
         b.find_element_by_name("q").send_keys("atve")
         b.find_element_by_name("q").submit()
         time.sleep(5)
         self.assertTrue(b.find_element_by_id("logocont") != None)
     except Exception as e:
         L.warning(str(e))
     finally:
         b.quit()
開發者ID:TE-ToshiakiTanaka,項目名稱:atve,代碼行數:16,代碼來源:browser_05.py

示例5: test

# 需要導入模塊: from atve.log import LOG [as 別名]
# 或者: from atve.log.LOG import warning [as 別名]
 def test(self):
     try:
         self.assertTrue("atve.browser" in self.service.keys())
         b = self.service["atve.browser"].get("Chrome")
         self.assertTrue(b != None)
         b.start(self.get("browser.url"), self.get("browser.driver"))
         b.find_element_by_name("q").send_keys("atve")
         b.find_element_by_name("q").submit()
         time.sleep(5)
         self.assertTrue(b.find_element_by_class("sfibbbc") != None)
     except Exception as e:
         L.warning(str(e))
     finally:
         b.quit()
開發者ID:TE-ToshiakiTanaka,項目名稱:atve,代碼行數:16,代碼來源:browser_06_2.py

示例6: __init__

# 需要導入模塊: from atve.log import LOG [as 別名]
# 或者: from atve.log.LOG import warning [as 別名]
 def __init__(self, path, clear=False):
     if not type(path) in STRING_SET:
         raise WorkspaceError("path must be strings.")
     self.default_path = os.path.abspath(path)
     if os.path.exists(path):
         if len(os.listdir(path)) > 0:
             L.warning("It is not vacant folder in the path.")
             if clear:
                 try:
                     for f in os.listdir(path):
                         shutil.rmtree(os.path.join(path, f))
                 except Exception as e:
                     L.traceback()
                     raise WorkspaceError("it must be vacant folder in the path.")
     else:
         self._mkdir_recursive(self.default_path)
開發者ID:TE-ToshiakiTanaka,項目名稱:atve,代碼行數:18,代碼來源:workspace.py

示例7: register

# 需要導入模塊: from atve.log import LOG [as 別名]
# 或者: from atve.log.LOG import warning [as 別名]
 def register(cls, host):
     sys.path.append(host)
     if not os.path.exists(host):
         raise LibraryError("%s is not exists." % (host))
     for fdn in os.listdir(host):
         try:
             if fdn.endswith(".pyc") or fdn.endswith(".py"):
                 pass
             elif fdn.endswith("__pycache__"):
                 pass
             else:
                 module = importlib.import_module("%s.service" % fdn)
                 cls.service[module.NAME] = module.FACTORY
         except Exception as e:
             L.warning(traceback.print_exc())
             L.warning(type(e).__name__ + ": " + str(e))
開發者ID:TE-ToshiakiTanaka,項目名稱:atve,代碼行數:18,代碼來源:atvescript.py

示例8: test

# 需要導入模塊: from atve.log import LOG [as 別名]
# 或者: from atve.log.LOG import warning [as 別名]
 def test(self):
     try :
         self.assertTrue("atve.browser" in self.service.keys())
         b = self.service["atve.browser"].get("FireFox")
         self.assertTrue(b != None)
         b.start(self.get("browser.url"))
         b.find_element_by_name("q").send_keys("atve")
         b.find_element_by_name("q").submit()
         time.sleep(5)
         self.assertTrue(self.get("system.tmp") != None)
         b.screenshot(self.get("system.tmp"));
         self.assertTrue(os.path.exists(
             os.path.join(self.get("system.tmp"), "screen.png")))
     except Exception as e:
         L.warning(str(e))
     finally:
         b.quit()
開發者ID:TE-ToshiakiTanaka,項目名稱:atve,代碼行數:19,代碼來源:browser_07.py

示例9: rmdir

# 需要導入模塊: from atve.log import LOG [as 別名]
# 或者: from atve.log.LOG import warning [as 別名]
    def rmdir(self, folder, host=""):
        if not type(folder) in STRING_SET:
            raise WorkspaceError("folder must be strings.")

        if host == "":
            path = os.path.join(self.root(), folder)
        else:
            if not os.path.exists(host):
                L.warning("it is not exists %s" % host)
                return host
            path = os.path.join(host, folder)

        if not os.path.exists(path):
            L.warning("it is not exists %s" % path)
            return path
        else:
            try:
                shutil.rmtree(path); return path
            except Exception as e:
                L.traceback()
                raise WorkspaceError("Can't remove file %s. Please Check File Permission." % path)
開發者ID:TE-ToshiakiTanaka,項目名稱:atve,代碼行數:23,代碼來源:workspace.py

示例10: mkdir

# 需要導入模塊: from atve.log import LOG [as 別名]
# 或者: from atve.log.LOG import warning [as 別名]
    def mkdir(self, folder, host="", clear=False):
        if not type(folder) in STRING_SET:
            raise WorkspaceError("folder must be strings.")
        if host == "":
            path = os.path.join(self.root(), folder)
        else:
            if not os.path.exists(host): self._mkdir_recursive(host)
            path = os.path.join(host, folder)

        if os.path.exists(path):
            if len(os.listdir(path)) > 0:
                L.warning("It is not vacant folder in the path.")
                if clear:
                    try:
                        for f in os.listdir(path):
                            shutil.rmtree(os.path.join(path, f))
                    except Exception as e:
                        L.traceback()
                        raise WorkspaceError("it must be vacant folder in the path.")
        else:
            self._mkdir_recursive(path)
        return path
開發者ID:TE-ToshiakiTanaka,項目名稱:atve,代碼行數:24,代碼來源:workspace.py


注:本文中的atve.log.LOG.warning方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。