forked from deepchem/deepchem
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathtests.py
More file actions
39 lines (29 loc) · 729 Bytes
/
Copy pathtests.py
File metadata and controls
39 lines (29 loc) · 729 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
import os
import subprocess
import tempfile
def _example_run(path):
"""Checks that the example at the specified path runs corrently.
Parameters
----------
path: str
Path to example file.
Returns
-------
result: int
Return code. 0 for success, failure otherwise.
"""
cmd = ["python", path]
# Will raise a CalledProcessError if fails.
retval = subprocess.check_output(cmd)
return retval
def test_adme():
print("Running test_adme()")
output = _example_run("./adme/run_benchmarks.py")
print(output)
def test_tox21_fcnet():
print("Running tox21_fcnet()")
output = _example_run("./tox21/tox21_fcnet.py")
print(output)
if __name__ == "__main__":
test_tox21_fcnet()
test_adme()