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)
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)