How to use the honcho.environ.Procfile function in honcho

To help you get started, we’ve selected a few honcho 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 nickstenning / honcho / tests / test_environ.py View on Github external
def test_has_no_processes_after_init(self):
        p = environ.Procfile()
        assert len(p.processes) == 0
github nickstenning / honcho / tests / test_environ.py View on Github external
def test_add_process(self):
        p = environ.Procfile()
        p.add_process('foo', 'echo 123')
        assert 'echo 123' == p.processes['foo']
github nickstenning / honcho / tests / test_environ.py View on Github external
def test_add_process_ensures_unique_name(self):
        p = environ.Procfile()
        p.add_process('foo', 'echo 123')
        with pytest.raises(AssertionError):
            p.add_process('foo', 'echo 123')
github nickstenning / honcho / honcho / environ.py View on Github external
def parse_procfile(contents):
    p = Procfile()
    for line in contents.splitlines():
        m = PROCFILE_LINE.match(line)
        if m:
            p.add_process(m.group(1), m.group(2))
    return p