Skip to content

Commit

Permalink
update test on result pickle dict
Browse files Browse the repository at this point in the history
  • Loading branch information
dingquanyu committed Jun 17, 2024
1 parent 74c307e commit 4e0880f
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions test/check_predict_structure.py
Original file line number Diff line number Diff line change
Expand Up @@ -81,10 +81,10 @@ def _runCommonTests(self, result, multimer_mode: True):
example_pickle = [f for f in os.listdir(os.path.join(self.output_dir, dirname)) if f.startswith("result") and f.endswith(".pkl")][0]
example_pickle = pickle.load(open((os.path.join(self.output_dir, dirname, example_pickle)), 'rb'))
if multimer_mode:
required_keys = ['distogram', 'experimentally_resolved', 'masked_msa', 'predicted_aligned_error', 'predicted_lddt', 'structure_module', 'plddt', 'aligned_confidence_probs', 'max_predicted_aligned_error', 'ptm', 'iptm', 'ranking_confidence']
required_keys = ['distogram', 'experimentally_resolved', 'masked_msa', 'predicted_aligned_error', 'predicted_lddt', 'structure_module', 'plddt', 'aligned_confidence_probs', 'max_predicted_aligned_error', 'seqs', 'ptm', 'iptm', 'ranking_confidence']
else:
required_keys = ['distogram', 'experimentally_resolved', 'masked_msa', 'predicted_aligned_error', 'predicted_lddt', 'structure_module', 'plddt', 'aligned_confidence_probs', 'max_predicted_aligned_error', 'ranking_confidence']
self.assertListEqual(list(example_pickle.keys()), required_keys)
required_keys = ['distogram', 'experimentally_resolved', 'masked_msa', 'predicted_aligned_error', 'predicted_lddt', 'structure_module', 'plddt', 'aligned_confidence_probs', 'max_predicted_aligned_error', 'seqs','ranking_confidence']
self.assertContainsSubset(required_keys, list(example_pickle.keys()))
#Check if the directory contains five files starting from pae and ending with .json
self.assertEqual(len([f for f in os.listdir(os.path.join(self.output_dir, dirname)) if f.startswith("pae") and f.endswith(".json")]), 5)
#Check if the directory contains five files ending with png
Expand Down

0 comments on commit 4e0880f

Please sign in to comment.