def test_front_matter_errors(self): # Unrecognized file extension self.assertEqual(utils.find_front_matter('boop', '.cake'), '') self.assertEqual(utils.parse_front_matter('boop', '.cake'), {})
def _find_fm_test(self, name): prefix, ext = os.path.splitext(name) actual = self.load_fixture(name) expected = self.load_fixture('{}-find-expected{}'.format(prefix, ext)) self.assertEqual(utils.find_front_matter(actual, ext[1:]), expected)