Exemple #1
0
 def test_frontmatter_extraction(self):
     data = get_case_contents('simple_frontmatter.txt')
     frontmatter, text = reader.extract_frontmatter(data)
     assert(frontmatter == "\nHi, I'm Frontmatter\n")
     assert("I'm a unicorn!" in text)
Exemple #2
0
 def test_frontmatter_extraction(self):
     data = get_case_contents('simple_frontmatter.txt')
     frontmatter, text = reader.extract_frontmatter(data)
     assert (frontmatter == "\nHi, I'm Frontmatter\n")
     assert ("I'm a unicorn!" in text)
Exemple #3
0
 def test_no_frontmatter(self):
     data = get_case_contents('no_frontmatter.txt')
     frontmatter, text = reader.extract_frontmatter(data)
     assert(frontmatter == None)
     assert("I don't have frontmatter at all" in text)
Exemple #4
0
 def test_no_frontmatter(self):
     data = get_case_contents('no_frontmatter.txt')
     frontmatter, text = reader.extract_frontmatter(data)
     assert (frontmatter == None)
     assert ("I don't have frontmatter at all" in text)