def main(): try: import pyquickhelper import pyensae except ImportError: sys.path.append( os.path.normpath( os.path.abspath( os.path.join( os.path.split(__file__)[0], "..", "..", "pyquickhelper", "src")))) import pyquickhelper sys.path.append( os.path.normpath( os.path.abspath( os.path.join( os.path.split(__file__)[0], "..", "..", "pyensae", "src")))) import pyquickhelper from pyquickhelper import fLOG, run_cmd, main_wrapper_tests fLOG(OutputPrint=True) main_wrapper_tests(__file__)
generate_help_sphinx(project_name, module_name=project_var_name, layout=["pdf", "html"], extra_ext=["tohelp"]) elif "unittests" in sys.argv: if not os.path.exists("_unittests"): raise FileNotFoundError( "you must get the source from GitHub to run the unittests") run_unit = os.path.join("_unittests", "run_unittests.py") if not os.path.exists(run_unit): raise FileNotFoundError("the folder should contain run_unittests.py") pyquickhelper = import_pyquickhelper() pyquickhelper.main_wrapper_tests(run_unit, add_coverage=True) else: setup( name=project_var_name, version='%s.%s' % (sversion, subversion) if "register" in sys.argv or "sdist" in sys.argv or "bdist_wheel" in sys.argv or "bdist_msi" in sys.argv or "install" in sys.argv else 'py%s-%s.%s' % (versionPython, sversion, subversion), author='author', author_email='author AT something.any', url="http://...", download_url="https://github.com/.../", description=DESCRIPTION, long_description=long_description,
module_name=project_var_name) elif "unittests" in sys.argv: if not os.path.exists("_unittests"): raise FileNotFoundError( "you must get the source from GitHub to run the unittests") run_unit = os.path.join("_unittests", "run_unittests.py") if not os.path.exists(run_unit): raise FileNotFoundError( "the folder should contain run_unittests.py") pyquickhelper = import_pyquickhelper() pyquickhelper.main_wrapper_tests(run_unit, add_coverage=True, skip_function=skip_function) elif "custom_left" in sys.argv: if not os.path.exists("_unittests"): raise FileNotFoundError( "you must get the source from GitHub to run the unittests") run_unit = os.path.join("_unittests", "run_unittests.py") if not os.path.exists(run_unit): raise FileNotFoundError( "the folder should contain run_unittests.py") pyquickhelper = import_pyquickhelper() pyquickhelper.main_wrapper_tests(run_unit,
module_name=project_var_name) elif "unittests" in sys.argv: if not os.path.exists("_unittests"): raise FileNotFoundError( "you must get the source from GitHub to run the unittests") run_unit = os.path.join("_unittests", "run_unittests.py") if not os.path.exists(run_unit): raise FileNotFoundError( "the folder should contain run_unittests.py") pyquickhelper = import_pyquickhelper() pyquickhelper.main_wrapper_tests( run_unit, add_coverage=True, skip_function=skip_function) elif "custom_left" in sys.argv: if not os.path.exists("_unittests"): raise FileNotFoundError( "you must get the source from GitHub to run the unittests") run_unit = os.path.join("_unittests", "run_unittests.py") if not os.path.exists(run_unit): raise FileNotFoundError( "the folder should contain run_unittests.py") pyquickhelper = import_pyquickhelper() pyquickhelper.main_wrapper_tests(