Exemple #1
0
 def test_raises_io_error_when_file_doesnt_exist_and_require_exists_is_false(
         self):
     invalid_path = os.path.join("this", "path", "doesnt", "exist")
     parser = ShortcutParser()
     with self.assertRaises(IOError):
         parser.parse(invalid_path, require_exists=True)
Exemple #2
0
 def test_raises_io_error_when_file_doesnt_exist(self):
     invalid_path = os.path.join("this", "path", "doesnt", "exist")
     parser = ShortcutParser()
     with self.assertRaises(IOError):
         parser.parse(invalid_path)
Exemple #3
0
 def test_returns_empty_list_when_file_doesnt_exist(self):
     invalid_path = os.path.join("this", "path", "doesnt", "exist")
     parser = ShortcutParser()
     self.assertEqual(parser.parse(invalid_path), [])
 def test_returns_empty_list_when_file_doesnt_exist(self):
   invalid_path = os.path.join("this", "path", "doesnt", "exist")
   parser = ShortcutParser()
   self.assertEqual(parser.parse(invalid_path), [])