Ejemplo n.º 1
0
 def test_raise_check_markdown_file(self):
     with self.assertRaises(MetaPostReaderError):
         null_path = Path.cwd().joinpath("invalidFile.txt")
         MetaPostReader._check_markdown_file(null_path)
     with self.assertRaises(MetaPostReaderError):
         null_path = Path.cwd().joinpath("null_path.py")
         MetaPostReader._check_markdown_file(null_path)
Ejemplo n.º 2
0
 def test_raise_check_markdown_file(self):
     # null file path
     mtpr = MetaPostReader()
     null_path = Path.cwd().joinpath("null_dirpath")
     with self.assertRaises(MetaPostReaderError):
         mtpr._check_markdown_file(null_path)
     # not .md file
     mtpr = MetaPostReader()
     null_path = Path.cwd().joinpath("__init__.py")
     with self.assertRaises(MetaPostReaderError):
         mtpr._check_markdown_file(null_path)