How to use the mutmut.workers.worker_main function in mutmut

To help you get started, we’ve selected a few mutmut 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 boxed / mutmut / mutmut / workers / same_process.py View on Github external
exec(dependency_imports)

    try:
        exec(runner_setup)
    except SystemExit:
        # pytest.main calls sys.exit instead of exiting cleanly :(
        pass
    try:
        exec(startup_imports)
    except SystemExit:
        # pytest.main calls sys.exit instead of exiting cleanly :(
        pass

    imports_checkpoint.update(set(sys.modules.keys()))
    assert imports_checkpoint
    worker_main(tests_pass)
github boxed / mutmut / mutmut / workers / separate_process.py View on Github external
def main():
    os.environ['PYTHONDONTWRITEBYTECODE'] = '1'  # stop python from creating .pyc files

    worker_main(tests_pass)