@@ -0,0 +1,2056 @@
+# coding: latin-1%0A%22%22%22%0A@brief      test log(time=1s)%0A%0AYou should indicate a time in seconds. The program %60%60run_unittests.py%60%60%0Awill sort all test files by increasing time and run them.%0A%22%22%22%0A%0A%0Aimport sys%0Aimport os%0Aimport unittest%0A%0A%0Atry:%0A    import src%0Aexcept ImportError:%0A    path = os.path.normpath(%0A        os.path.abspath(%0A            os.path.join(%0A                os.path.split(__file__)%5B0%5D,%0A                %22..%22,%0A                %22..%22)))%0A    if path not in sys.path:%0A        sys.path.append(path)%0A    import src%0A%0Atry:%0A    import pyquickhelper as skip_%0Aexcept ImportError:%0A    path = os.path.normpath(%0A        os.path.abspath(%0A            os.path.join(%0A                os.path.split(__file__)%5B0%5D,%0A                %22..%22,%0A                %22..%22,%0A                %22..%22,%0A                %22pyquickhelper%22,%0A                %22src%22)))%0A    if path not in sys.path:%0A        sys.path.append(path)%0A    if %22PYQUICKHELPER%22 in os.environ and len(os.environ%5B%22PYQUICKHELPER%22%5D) %3E 0:%0A        sys.path.append(os.environ%5B%22PYQUICKHELPER%22%5D)%0A    import pyquickhelper as skip_%0A%0A%0Afrom pyquickhelper.loghelper import fLOG%0Afrom src.project_name.subproject.myexample import myclass%0Afrom src.project_name.subproject.myexampleb import myclassb%0Afrom src.project_name.subproject2.myexample2 import myclass2%0Afrom src.project_name import _setup_hook%0A%0A%0Aclass TestExampleExt (unittest.TestCase):%0A%0A    def test_static(self):%0A        fLOG(%0A            __file__,%0A            self._testMethodName,%0A            OutputPrint=__name__ == %22__main__%22)%0A%0A        assert myclass2.static_example()%0A        cl = myclass2(1)%0A        assert cl.property_example%0A%0A    def test_hook(self):%0A        fLOG(%0A            __file__,%0A            self._testMethodName,%0A            OutputPrint=__name__ == %22__main__%22)%0A%0A        _setup_hook()%0A%0A    def test_myclassb(self):%0A        fLOG(%0A            __file__,%0A            self._testMethodName,%0A            OutputPrint=__name__ == %22__main__%22)%0A%0A        b = myclassb(1)%0A        c = b.method_napoleon(1, 2)%0A        self.assertEqual(c, 3)%0A%0A%0Aif __name__ == %22__main__%22:%0A    unittest.main()%0A

extend unit test coverage