Example #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)
Example #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']
Example #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
Example #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
Example #5
0
def test_parse_procfile(content, processes):
    content = textwrap.dedent(content)
    p = environ.parse_procfile(content)
    assert p.processes == processes
Example #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)
Example #7
0
def test_parse_procfile(content, processes):
    content = textwrap.dedent(content)
    p = environ.parse_procfile(content)
    assert p.processes == processes
Example #8
0
def get_procfile(name):
    with open(os.path.join(FIXTURE_ROOT, name)) as f:
        return environ.parse_procfile(f.read())
Example #9
0
def get_procfile(name):
    with open(os.path.join(FIXTURE_ROOT, name)) as f:
        return environ.parse_procfile(f.read())