Example #1
0
 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'), {})
Example #2
0
	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'), {})
Example #3
0
 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)
Example #4
0
	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)