def test_make_db_wrong_input(self): fp = join(self.tmp_dir, 'db.dmnd') for i in self.neg_fp: with self.assertRaisesRegex( ApplicationError, r'(Error reading file)|(Invalid input file format)'): make_db(i, fp)
def test_make_db(self): fp = join(self.tmp_dir, 'db.dmnd') make_db(self.db_fa, fp) with open(fp, 'rb') as obs, open(self.db, 'rb') as exp: self.assertEqual(obs.read(), exp.read())