Tschoui commited on
Commit
e5e228d
·
1 Parent(s): 4e3e852

✅ Test predict output

Browse files
Files changed (3) hide show
  1. .gitignore +1 -0
  2. app.py +1 -1
  3. tests/test_predict.py +10 -2
.gitignore ADDED
@@ -0,0 +1 @@
 
 
1
+ __pycache__/
app.py CHANGED
@@ -42,7 +42,7 @@ def metadata():
42
  "name": "AwesomeTox",
43
  "version": "1.0.0",
44
  "max_batch_size": 256,
45
- "tox_endpoints": ["mutagenicity","hepatotoxicity"],
46
  }
47
 
48
  @app.get("/healthz")
 
42
  "name": "AwesomeTox",
43
  "version": "1.0.0",
44
  "max_batch_size": 256,
45
+ "tox_endpoints": ["NR-AR", "NR-AR-LBD", "NR-AhR", "NR-Aromatase", "NR-ER", "NR-ER-LBD", "NR-PPAR-gamma", "SR-ARE", "SR-ATAD5", "SR-HSE", "SR-MMP", "SR-p53"],
46
  }
47
 
48
  @app.get("/healthz")
tests/test_predict.py CHANGED
@@ -1,7 +1,9 @@
1
  """
2
  Tests for the predict.py module
3
  """
4
-
 
 
5
  from predict import predict, Tox21RandomClassifier
6
 
7
 
@@ -62,4 +64,10 @@ class TestPredictFunction:
62
 
63
  def test_predict_function_empty(self):
64
  result = predict([])
65
- assert result == {}
 
 
 
 
 
 
 
1
  """
2
  Tests for the predict.py module
3
  """
4
+ import sys
5
+ import pathlib
6
+ sys.path.insert(0, str(pathlib.Path(__file__).resolve().parents[1]))
7
  from predict import predict, Tox21RandomClassifier
8
 
9
 
 
64
 
65
  def test_predict_function_empty(self):
66
  result = predict([])
67
+ assert result == {}
68
+
69
+ #---------------------------------------------------------------------------------------
70
+ # Debugging
71
+ if __name__ == "__main__":
72
+ test = TestTox21RandomClassifier()
73
+ test.test_predict_multiple_smiles()