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


Python log.LOG类代码示例

本文整理汇总了Python中atve.log.LOG的典型用法代码示例。如果您正苦于以下问题:Python LOG类的具体用法?Python LOG怎么用?Python LOG使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。


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

示例1: test

    def test(self):
        self.assertTrue("atve.picture" in self.service.keys())
        self.assertTrue(self.service["atve.picture"].version() != None)
        pic = self.service["atve.picture"].get()

        self.assertTrue(self.get("system.tmp") != None)
        L.info(os.path.join(self.get("system.tmp"), "test01.png"))
        pic.info(pic.open(os.path.join(self.get("system.tmp"), "test01.png")))
开发者ID:TE-ToshiakiTanaka,项目名称:atve,代码行数:8,代码来源:picture_05.py

示例2: test

    def test(self):
        self.assertTrue("atve.picture" in self.service.keys())
        self.assertTrue(self.service["atve.picture"].version() != None)
        pic = self.service["atve.picture"].get()

        self.assertTrue(self.get("system.tmp") != None)
        reference = os.path.join(self.get("system.tmp"), "test01.png")
        target = os.path.join(self.get("system.tmp"), "test01_target01.png")
        point = pic.search_pattern(reference, target)
        self.assertTrue(point != None)
        L.info(point)
开发者ID:TE-ToshiakiTanaka,项目名称:atve,代码行数:11,代码来源:picture_12.py

示例3: test

 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,代码行数:11,代码来源:browser_04.py

示例4: test

    def test(self):
        self.assertTrue("atve.picture" in self.service.keys())
        self.assertTrue(self.service["atve.picture"].version() != None)
        pic = self.service["atve.picture"].get()

        self.assertTrue(self.get("system.tmp") != None)
        img = pic.open(os.path.join(self.get("system.tmp"), "test01.png"))
        self.assertTrue(img != None)
        rgb = pic.get_rgb(img)
        self.assertTrue(len(rgb) == 3)
        L.info(rgb)
开发者ID:TE-ToshiakiTanaka,项目名称:atve,代码行数:11,代码来源:picture_06.py

示例5: test

 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,代码行数:11,代码来源:browser_04_2.py

示例6: rm

 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,代码行数:12,代码来源:workspace.py

示例7: test

 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,代码行数:14,代码来源:browser_06_2.py

示例8: test

 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,代码行数:14,代码来源:browser_05.py

示例9: test

    def test(self):
        self.assertTrue("atve.picture" in self.service.keys())
        self.assertTrue(self.service["atve.picture"].version() != None)
        pic = self.service["atve.picture"].get()

        self.assertTrue(self.get("system.tmp") != None)
        img = pic.open(os.path.join(self.get("system.tmp"), "test01.png"))
        self.assertTrue(img != None)
        opencv_img = pic.to_opencv(img)
        img2 = pic.to_pil(opencv_img)
        self.assertTrue(img2 != None)
        pic.save(img2, os.path.join(self.get("system.tmp"), "test02.png"))

        img3 = pic.open(os.path.join(self.get("system.tmp"), "test01.png"))
        self.assertTrue(img3 != None)
        L.info(pic.info(img3))
开发者ID:TE-ToshiakiTanaka,项目名称:atve,代码行数:16,代码来源:picture_08.py

示例10: __init__

 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,代码行数:16,代码来源:workspace.py

示例11: register

 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,代码行数:16,代码来源:atvescript.py

示例12: test

 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,代码行数:17,代码来源:browser_07.py

示例13: mkdir

    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,代码行数:22,代码来源:workspace.py

示例14: rmdir

    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,代码行数:21,代码来源:workspace.py

示例15: tearDownClass

 def tearDownClass(cls):
     L.info("*** End TestCase     : %s *** " % __file__)
开发者ID:TE-ToshiakiTanaka,项目名称:atve,代码行数:2,代码来源:browser_04.py


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