예제 #1
0
 def test_note_from_file_with_bad_notebook_format(self):
     path_to_test_note = os.path.join(THIS_DIR, 'data/note-with_bad_nb_format.md')
     note = Note()
     with self.assertRaises(RuntimeError) as cm:
         note.from_file(path_to_test_note)
     the_exception = cm.exception
     self.assertEqual(the_exception.message, 'Bad notebook line format')
예제 #2
0
 def test_note_from_file_with_bad_notebook_name(self):
     path_to_test_note = os.path.join(THIS_DIR, 'data/note-with_bad_nb_name.md')
     note = Note()
     with self.assertRaises(Folder.DoesNotExist) as cm:
         note.from_file(path_to_test_note)
예제 #3
0
 def test_note_from_file(self):
     path_to_test_note = os.path.join(THIS_DIR, 'data/note.md')
     note = Note()
     note.from_file(path_to_test_note)