Skip to content

Commit

Permalink
update pytest version
Browse files Browse the repository at this point in the history
  • Loading branch information
dp-yuanyn committed Jan 30, 2024
1 parent 6f41c5c commit 402a88f
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 8 deletions.
9 changes: 5 additions & 4 deletions .github/workflows/ci_unidock.yml
Original file line number Diff line number Diff line change
Expand Up @@ -42,16 +42,17 @@ jobs:
nvidia-smi
unidock --version
- name: Set up Python 3.8
- name: Set up Python 3.10
uses: actions/setup-python@v3
with:
python-version: 3.8
python-version: 3.10

- name: perform unit-test
run: |
python -m pip install --upgrade pip
pip install pytest
pytest unidock/test/ut -v
pip install pytest>=8.0.0 coverage
coverage run -m pytest unidock/test/ut -v
coverage xml
build_docker_image:
needs: unidock_test
Expand Down
4 changes: 2 additions & 2 deletions unidock/test/ut/test_unidock.py
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ def test_unidock_vina(self):
break
self.assertNotEqual(score_line, "")
score = float([e for e in score_line[len("REMARK VINA RESULT:"):].split(" ") if e!=""][0])
self.assertTrue(-12 <= score <= -5)
self.assertTrue(-20 <= score <= -1)

def test_unidock_vinardo(self):
cmd = f"unidock --receptor {self.receptor} --gpu_batch {self.ligand} --dir {self.workdir} \
Expand All @@ -63,7 +63,7 @@ def test_unidock_vinardo(self):
break
self.assertNotEqual(score_line, "")
score = float([e for e in score_line[len("REMARK VINA RESULT:"):].split(" ") if e!=""][0])
self.assertTrue(-12 <= score <= -5)
self.assertTrue(-20 <= score <= -1)

if __name__ == "__main__":
ut.main()
4 changes: 2 additions & 2 deletions unidock/test/ut/test_unidock_sdf.py
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ def test_unidock_sdf_vina(self):
break
self.assertNotEqual(score_line, "")
score = float([e for e in score_line[len("ENERGY="):].split(" ") if e!=""][0])
self.assertTrue(-15 <= score <= -8)
self.assertTrue(-20 <= score <= -1)

def test_unidock_sdf_vinardo(self):
cmd = f"unidock --receptor {self.receptor} --gpu_batch {self.ligand} --dir {self.workdir} \
Expand All @@ -69,7 +69,7 @@ def test_unidock_sdf_vinardo(self):
break
self.assertNotEqual(score_line, "")
score = float([e for e in score_line[len("ENERGY="):].split(" ") if e!=""][0])
self.assertTrue(-15 <= score <= -8)
self.assertTrue(-20 <= score <= -1)

if __name__ == "__main__":
ut.main()

0 comments on commit 402a88f

Please sign in to comment.