How to use honcho - 10 common examples

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_environ_parse(content, commands):
    content = textwrap.dedent(content)
    result = environ.parse(content)
    assert result == commands
github nickstenning / honcho / tests / test_manager.py View on Github external
def printer(self):  # noqa
        self.p = FakePrinter()
        self.m = Manager(printer=self.p)
        self.m._env = FakeEnv()
github nickstenning / honcho / tests / test_printer.py View on Github external
def test_write_multiline(self):
        out = FakeOutput()
        p = Printer(output=out)
        p.write(fake_message("one\ntwo\nthree\n"))
        expect = "12:42:00 | one\n12:42:00 | two\n12:42:00 | three\n"
        assert out.string() == expect
github nickstenning / honcho / tests / test_printer.py View on Github external
def test_write(self):
        out = FakeOutput()
        p = Printer(output=out)
        p.write(fake_message("monkeys\n"))
        assert out.string() == "12:42:00 | monkeys\n"
github nickstenning / honcho / tests / test_printer.py View on Github external
def test_write_with_set_width(self):
        out = FakeOutput()
        p = Printer(output=out, width=6)
        p.write(fake_message("giraffe\n"))
        assert out.string() == "12:42:00        | giraffe\n"
github nickstenning / honcho / tests / test_printer.py View on Github external
def test_write_with_name_and_set_width(self):
        out = FakeOutput()
        p = Printer(output=out, width=6)
        p.write(fake_message("narcissist\n", name="oop"))
        assert out.string() == "12:42:00 oop    | narcissist\n"
github nickstenning / honcho / tests / test_printer.py View on Github external
def test_write_without_prefix_and_colour_tty(self):
        out = FakeTTY()
        p = Printer(output=out, prefix=False, colour=False)
        p.write(fake_message("paranoid android\n", name="foo", colour="31"))
        assert out.string() == "paranoid android\n"
github nickstenning / honcho / tests / test_printer.py View on Github external
def test_write_no_newline(self):
        out = FakeOutput()
        p = Printer(output=out)
        p.write(fake_message("monkeys"))
        assert out.string() == "12:42:00 | monkeys\n"
github nickstenning / honcho / tests / test_printer.py View on Github external
def test_write_wrong_type(self):
        out = FakeOutput()
        p = Printer(output=out)
        with pytest.raises(RuntimeError):
            p.write(fake_message("monkeys\n", type="error"))