1a7b25c16209916dc248ccc99cd1e2eedf8de103,deepchem/feat/tests/test_molecule_graph.py,TestMoleculeGraph,test_invalid_molecule_graph_data,#TestMoleculeGraph#,31
Before Change
with pytest.raises(ValueError):
node_features = np.ones((5, 5))
invalid_edge_index_shape = np.ones((3, 10))
targets = np.ones(5)
mol_graph = MoleculeGraphData(
node_features=node_features,
edge_index=invalid_edge_index_shape,
After Change
def test_invalid_molecule_graph_data(self):
with pytest.raises(ValueError):
invalid_node_features_type = list(np.random.random_sample((5, 5)))
edge_index = np.array([
[0, 1, 2, 2, 3, 4],
[1, 2, 0, 3, 4, 0],
])
targets = np.random.random_sample(5)
mol_graph = MoleculeGraphData(
node_features=invalid_node_features_type,
edge_index=edge_index,
targets=targets,
)
with pytest.raises(ValueError):
node_features = np.random.random_sample((5, 5))
invalid_edge_index_shape = np.array([
[0, 1, 2, 2, 3, 4],
[1, 2, 0, 3, 4, 0],
[2, 2, 1, 4, 0, 3],
])
targets = np.random.random_sample(5)
mol_graph = MoleculeGraphData(
node_features=node_features,
edge_index=invalid_edge_index_shape,
In pattern: SUPERPATTERN
Frequency: 3
Non-data size: 8
Instances
Project Name: deepchem/deepchem
Commit Name: 1a7b25c16209916dc248ccc99cd1e2eedf8de103
Time: 2020-07-15
Author: nd.12021218@gmail.com
File Name: deepchem/feat/tests/test_molecule_graph.py
Class Name: TestMoleculeGraph
Method Name: test_invalid_molecule_graph_data
Project Name: nipy/dipy
Commit Name: 959bb1a6cd3e02463c06fb04ca1195bc6b3bc7b6
Time: 2020-07-20
Author: charles.poirier@usherbrooke.ca
File Name: dipy/reconst/tests/test_shm.py
Class Name:
Method Name: test_real_full_sh_basis
Project Name: nipy/dipy
Commit Name: 959bb1a6cd3e02463c06fb04ca1195bc6b3bc7b6
Time: 2020-07-20
Author: charles.poirier@usherbrooke.ca
File Name: dipy/reconst/tests/test_shm.py
Class Name:
Method Name: test_real_full_sh_mrtrix