예제 #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'), {})
예제 #2
0
파일: test_utils.py 프로젝트: T2BE/lfm
	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'), {})
예제 #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)
예제 #4
0
파일: test_utils.py 프로젝트: T2BE/lfm
	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)