Пример #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)
Пример #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)
Пример #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)
Пример #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)