Skip to content

Commit

Permalink
fix: Leverage_DOA removed numerical test
Browse files Browse the repository at this point in the history
  • Loading branch information
vassilismin committed Jun 7, 2024
1 parent 96f2472 commit fabc5ce
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions jaqpotpy/doa/tests/test_doa.py
Original file line number Diff line number Diff line change
Expand Up @@ -45,13 +45,11 @@ def test_leverage(self):

mol = [
'C[C@@](C)(O1)C[C@@H](O)[C@@]1(O2)[C@@H](C)[C@@H]3CC=C4[C@]3(C2)C(=O)C[C@H]5[C@H]4CC[C@@H](C6)[C@]5(C)Cc(n7)c6nc(C[C@@]89(C))c7C[C@@H]8CC[C@@H]%10[C@@H]9C[C@@H](O)[C@@]%11(C)C%10=C[C@H](O%12)[C@]%11(O)[C@H](C)[C@]%12(O%13)[C@H](O)C[C@@]%13(C)CO',
'COc1ccc2c(N)nn(C(=O)Cc3cccc(Cl)c3)c2c1'
, 'CN(C)c1ccc(N(Cc2ccsc2)C(=O)Cc2cncc3ccccc23)cc1']
'COc1ccc2c(N)nn(C(=O)Cc3cccc(Cl)c3)c2c1', 'CN(C)c1ccc(N(Cc2ccsc2)C(=O)Cc2cncc3ccccc23)cc1']

descriptors = featurizer(mol)
calc = doa.predict(descriptors)
assert len(calc)==len(mol), f"Expected len(calc) == len(mol), got {len(calc)} != {len(mol)}"
assert abs(doa.a - 16.17391304347826) < 0.00001, f"Expected doa.a == 16.17391304347826, got {doa.a} != 16.17391304347826"
assert calc[0]['IN']==False, f"Expected calc[0]['IN'] == False, got {calc[0]['IN']} != Flase"
assert calc[1]['IN']==True, f"Expected calc[0]['IN'] == True, got {calc[1]['IN']} != True"
assert calc[2]['IN']==True, f"Expected calc[0]['IN'] == True, got {calc[2]['IN']} != True"
Expand Down Expand Up @@ -193,4 +191,4 @@ def test_with_other_data_mean_var(self):
doa = MeanVar()
doa.fit(data)
calc = doa.predict(data)
assert len(calc) == len(data)
assert len(calc) == len(data)

0 comments on commit fabc5ce

Please sign in to comment.