How to use the green.cmdline.main function in green

To help you get started, we’ve selected a few green examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github CleanCut / green / green / command.py View on Github external
def run(self):
        self.ensure_finalized()

        if self.distribution.install_requires:
            self.distribution.fetch_build_eggs(
                self.distribution.install_requires)
        if self.distribution.tests_require:
            self.distribution.fetch_build_eggs(
                self.distribution.tests_require)

        script_args = self.distribution.script_args[1:]
        if self.distribution.test_suite is not None:
            script_args.append(self.distribution.test_suite)

        error_code = main(script_args)
        if error_code:
            sys.exit(error_code)
github Eugeny / grip / setup.py View on Github external
def run_tests(self):
        from green.cmdline import main
        main(argv=['-r', '-vv'])
        import coverage
        cov = coverage.Coverage()
        cov.load()
        cov.html_report()