Skip to content

Commit

Permalink
Merge pull request #3662 from shreyasvinaya/CI-Fix
Browse files Browse the repository at this point in the history
CI Unit tests fix
  • Loading branch information
rbharath committed Nov 8, 2023
2 parents 933e3b9 + b586e7e commit 6de1881
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 4 deletions.
2 changes: 1 addition & 1 deletion deepchem/data/tests/test_fasta_loader.py
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ def test_fasta_one_hot_big(self):
]
input_file = os.path.join(self.current_dir, "uniprot_truncated.fasta")
loader = dc.data.FASTALoader(OneHotFeaturizer(charset=protein,
max_length=1000),
max_length=1165),
legacy=False)
sequences = loader.create_dataset(input_file)

Expand Down
9 changes: 6 additions & 3 deletions deepchem/feat/tests/test_dmpnn_featurizer.py
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,8 @@ def test_featurizer_ring(test_parameters):
if use_original_atom_ranks:
assert (graph_feat[0].edge_index == edge_index_orignal_order[0]).all()
else:
if graph_feat[0].edge_index.shape == edge_index_orignal_order[0]:
if np.array_equal(graph_feat[0].edge_index.shape,
edge_index_orignal_order[0]):
assert (graph_feat[0].edge_index !=
edge_index_orignal_order[0]).any()

Expand Down Expand Up @@ -152,7 +153,8 @@ def test_featurizer_general_case(test_parameters):
if use_original_atom_ranks:
assert (graph_feat[1].edge_index == edge_index_orignal_order[1]).all()
else:
if graph_feat[1].edge_index.shape == edge_index_orignal_order[1]:
if np.array_equal(graph_feat[1].edge_index.shape,
edge_index_orignal_order[1]):
assert (graph_feat[1].edge_index !=
edge_index_orignal_order[1]).any()

Expand Down Expand Up @@ -206,7 +208,8 @@ def test_featurizer_single_atom(test_parameters):
if use_original_atom_ranks:
assert (graph_feat[2].edge_index == edge_index_orignal_order[2]).all()
else:
if graph_feat[2].edge_index.shape == edge_index_orignal_order[2]:
if np.array_equal(graph_feat[2].edge_index.shape,
edge_index_orignal_order[2]):
# the atom order for 'C' is same in case of canonical and original ordering
assert (
graph_feat[2].edge_index == edge_index_orignal_order[2]).all()

0 comments on commit 6de1881

Please sign in to comment.