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