Exemplo n.º 1
0
    def test_procfile_ordered(self):
        content = textwrap.dedent("""
        one: onecommand
        two: twocommand
        three: twocommand
        four: fourcommand
        """)

        p = environ.parse_procfile(content)
        order = [k for k in p.processes]
        self.assertEqual(['one', 'two', 'three', 'four'], order)
Exemplo n.º 2
0
def test_parse_procfile_ordered():
    content = textwrap.dedent("""
    one: onecommand
    two: twocommand
    three: twocommand
    four: fourcommand
    """)

    p = environ.parse_procfile(content)
    order = [k for k in p.processes]
    assert order == ['one', 'two', 'three', 'four']
Exemplo n.º 3
0
def _procfile(filename):
    try:
        with open(filename) as f:
            content = f.read()
    except IOError:
        raise CommandError('Procfile does not exist or is not a file')

    try:
        procfile = environ.parse_procfile(content)
    except AssertionError as e:
        raise CommandError(str(e))

    return procfile
Exemplo n.º 4
0
def _procfile(filename):
    try:
        with open(filename) as f:
            content = f.read()
    except IOError:
        raise CommandError('Procfile does not exist or is not a file')

    try:
        procfile = environ.parse_procfile(content)
    except AssertionError as e:
        raise CommandError(str(e))

    return procfile
Exemplo n.º 5
0
def test_parse_procfile(content, processes):
    content = textwrap.dedent(content)
    p = environ.parse_procfile(content)
    assert p.processes == processes
Exemplo n.º 6
0
 def test_parse_procfiles(self):
     for content, processes in PROCFILE_FIXTURES:
         content = textwrap.dedent(content)
         p = environ.parse_procfile(content)
         self.assertEqual(p.processes, processes)
Exemplo n.º 7
0
def test_parse_procfile(content, processes):
    content = textwrap.dedent(content)
    p = environ.parse_procfile(content)
    assert p.processes == processes
Exemplo n.º 8
0
def get_procfile(name):
    with open(os.path.join(FIXTURE_ROOT, name)) as f:
        return environ.parse_procfile(f.read())
Exemplo n.º 9
0
def get_procfile(name):
    with open(os.path.join(FIXTURE_ROOT, name)) as f:
        return environ.parse_procfile(f.read())