def test_main(self): result = chevron.main('tests/test.mustache', 'tests/data.json', partials_path='tests') with open('tests/test.rendered', 'r') as f: expected = f.read() self.assertEqual(result, expected)
def test_main(self): result = chevron.main('tests/test.mustache', 'tests/data.json', partials_path='tests') with io.open('tests/test.rendered', 'r', encoding='utf-8') as f: expected = f.read() if not python3: expected = expected.encode('utf-8') self.assertEqual(result, expected)