Skip to content

Commit

Permalink
perform tests in tmpdir
Browse files Browse the repository at this point in the history
  • Loading branch information
adw62 committed Oct 7, 2022
1 parent 120e6de commit 3be63e5
Show file tree
Hide file tree
Showing 37 changed files with 326 additions and 418 deletions.
1 change: 1 addition & 0 deletions MANIFEST.in
Original file line number Diff line number Diff line change
Expand Up @@ -4,3 +4,4 @@ include TIES_MD/eng_scripts/namd_sub/*
include TIES_MD/eng_scripts/openmm_sub_split/*
include TIES_MD/eng_scripts/openmm_sub/*
include TIES_MD/eng_scripts/cfg_scripts/*
graft TIES_MD/tests
1 change: 0 additions & 1 deletion TIES_MD/doc/source/TIES_MD.rst
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@ Subpackages

TIES_MD.eng_scripts
TIES_MD.openmmtools
TIES_MD.tests
TIES_MD.ties_analysis

Submodules
Expand Down
3 changes: 0 additions & 3 deletions TIES_MD/tests/__init__.py

This file was deleted.

11 changes: 11 additions & 0 deletions TIES_MD/tests/run.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
import pytest, tempfile, os, site, shutil

with tempfile.TemporaryDirectory() as tmpdirname:
print('created temporary directory', tmpdirname)
test_dir = os.path.join(site.getsitepackages()[0], 'TIES_MD', 'tests')
tmp_test_dir = os.path.join(tmpdirname, 'TIES_MD', 'unit_testing', 'tests')
shutil.copytree(test_dir, tmp_test_dir)
pytest.main([os.path.join(tmp_test_dir)])



1 change: 1 addition & 0 deletions TIES_MD/tests/test_TIES.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
from pathlib import Path
import glob
import copy
import site

from TIES_MD.TIES import *

Expand Down
1 change: 0 additions & 1 deletion TIES_MD/tests/test_alch.py
Original file line number Diff line number Diff line change
Expand Up @@ -350,5 +350,4 @@ def turn_off_interactions(state, system, appearing, disappearing):
force.setExceptionParameters(idx, a, b, 0, sig, eps)

if __name__ == '__main__':

unittest.main()
2 changes: 2 additions & 0 deletions TIES_MD/tests/test_namd.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@

import unittest
import numpy as np
import site, os

from TIES_MD.ties_analysis.engines.namd import *


Expand Down
2 changes: 2 additions & 0 deletions TIES_MD/tests/test_openmm.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@

import unittest
import numpy as np
import site, os

from TIES_MD.ties_analysis.engines.openmm import *


Expand Down
1 change: 1 addition & 0 deletions docs/API.html
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@
<script src="_static/underscore.js"></script>
<script src="_static/_sphinx_javascript_frameworks_compat.js"></script>
<script src="_static/doctools.js"></script>
<script src="_static/sphinx_highlight.js"></script>
<script src="_static/js/theme.js"></script>
<link rel="index" title="Index" href="genindex.html" />
<link rel="search" title="Search" href="search.html" />
Expand Down
1 change: 1 addition & 0 deletions docs/HPC_submissions.html
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@
<script src="_static/underscore.js"></script>
<script src="_static/_sphinx_javascript_frameworks_compat.js"></script>
<script src="_static/doctools.js"></script>
<script src="_static/sphinx_highlight.js"></script>
<script src="_static/js/theme.js"></script>
<link rel="index" title="Index" href="genindex.html" />
<link rel="search" title="Search" href="search.html" />
Expand Down
2 changes: 1 addition & 1 deletion docs/TIES_MD.eng_scripts.cfg_scripts.html
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@
<script src="_static/underscore.js"></script>
<script src="_static/_sphinx_javascript_frameworks_compat.js"></script>
<script src="_static/doctools.js"></script>
<script src="_static/sphinx_highlight.js"></script>
<script src="_static/js/theme.js"></script>
<link rel="index" title="Index" href="genindex.html" />
<link rel="search" title="Search" href="search.html" />
Expand Down Expand Up @@ -55,7 +56,6 @@
<li class="toctree-l3 current"><a class="reference internal" href="TIES_MD.html#subpackages">Subpackages</a><ul class="current">
<li class="toctree-l4 current"><a class="reference internal" href="TIES_MD.eng_scripts.html">TIES_MD.eng_scripts package</a></li>
<li class="toctree-l4"><a class="reference internal" href="TIES_MD.openmmtools.html">TIES_MD.openmmtools package</a></li>
<li class="toctree-l4"><a class="reference internal" href="TIES_MD.tests.html">TIES_MD.tests package</a></li>
<li class="toctree-l4"><a class="reference internal" href="TIES_MD.ties_analysis.html">TIES_MD.ties_analysis package</a></li>
</ul>
</li>
Expand Down
2 changes: 1 addition & 1 deletion docs/TIES_MD.eng_scripts.html
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@
<script src="_static/underscore.js"></script>
<script src="_static/_sphinx_javascript_frameworks_compat.js"></script>
<script src="_static/doctools.js"></script>
<script src="_static/sphinx_highlight.js"></script>
<script src="_static/js/theme.js"></script>
<link rel="index" title="Index" href="genindex.html" />
<link rel="search" title="Search" href="search.html" />
Expand Down Expand Up @@ -55,7 +56,6 @@
<li class="toctree-l3 current"><a class="reference internal" href="TIES_MD.html#subpackages">Subpackages</a><ul class="current">
<li class="toctree-l4 current"><a class="current reference internal" href="#">TIES_MD.eng_scripts package</a></li>
<li class="toctree-l4"><a class="reference internal" href="TIES_MD.openmmtools.html">TIES_MD.openmmtools package</a></li>
<li class="toctree-l4"><a class="reference internal" href="TIES_MD.tests.html">TIES_MD.tests package</a></li>
<li class="toctree-l4"><a class="reference internal" href="TIES_MD.ties_analysis.html">TIES_MD.ties_analysis package</a></li>
</ul>
</li>
Expand Down
2 changes: 1 addition & 1 deletion docs/TIES_MD.eng_scripts.namd_sub.html
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@
<script src="_static/underscore.js"></script>
<script src="_static/_sphinx_javascript_frameworks_compat.js"></script>
<script src="_static/doctools.js"></script>
<script src="_static/sphinx_highlight.js"></script>
<script src="_static/js/theme.js"></script>
<link rel="index" title="Index" href="genindex.html" />
<link rel="search" title="Search" href="search.html" />
Expand Down Expand Up @@ -55,7 +56,6 @@
<li class="toctree-l3 current"><a class="reference internal" href="TIES_MD.html#subpackages">Subpackages</a><ul class="current">
<li class="toctree-l4 current"><a class="reference internal" href="TIES_MD.eng_scripts.html">TIES_MD.eng_scripts package</a></li>
<li class="toctree-l4"><a class="reference internal" href="TIES_MD.openmmtools.html">TIES_MD.openmmtools package</a></li>
<li class="toctree-l4"><a class="reference internal" href="TIES_MD.tests.html">TIES_MD.tests package</a></li>
<li class="toctree-l4"><a class="reference internal" href="TIES_MD.ties_analysis.html">TIES_MD.ties_analysis package</a></li>
</ul>
</li>
Expand Down
2 changes: 1 addition & 1 deletion docs/TIES_MD.eng_scripts.namd_sub_split.html
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@
<script src="_static/underscore.js"></script>
<script src="_static/_sphinx_javascript_frameworks_compat.js"></script>
<script src="_static/doctools.js"></script>
<script src="_static/sphinx_highlight.js"></script>
<script src="_static/js/theme.js"></script>
<link rel="index" title="Index" href="genindex.html" />
<link rel="search" title="Search" href="search.html" />
Expand Down Expand Up @@ -55,7 +56,6 @@
<li class="toctree-l3 current"><a class="reference internal" href="TIES_MD.html#subpackages">Subpackages</a><ul class="current">
<li class="toctree-l4 current"><a class="reference internal" href="TIES_MD.eng_scripts.html">TIES_MD.eng_scripts package</a></li>
<li class="toctree-l4"><a class="reference internal" href="TIES_MD.openmmtools.html">TIES_MD.openmmtools package</a></li>
<li class="toctree-l4"><a class="reference internal" href="TIES_MD.tests.html">TIES_MD.tests package</a></li>
<li class="toctree-l4"><a class="reference internal" href="TIES_MD.ties_analysis.html">TIES_MD.ties_analysis package</a></li>
</ul>
</li>
Expand Down
2 changes: 1 addition & 1 deletion docs/TIES_MD.eng_scripts.openmm_sub.html
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@
<script src="_static/underscore.js"></script>
<script src="_static/_sphinx_javascript_frameworks_compat.js"></script>
<script src="_static/doctools.js"></script>
<script src="_static/sphinx_highlight.js"></script>
<script src="_static/js/theme.js"></script>
<link rel="index" title="Index" href="genindex.html" />
<link rel="search" title="Search" href="search.html" />
Expand Down Expand Up @@ -55,7 +56,6 @@
<li class="toctree-l3 current"><a class="reference internal" href="TIES_MD.html#subpackages">Subpackages</a><ul class="current">
<li class="toctree-l4 current"><a class="reference internal" href="TIES_MD.eng_scripts.html">TIES_MD.eng_scripts package</a></li>
<li class="toctree-l4"><a class="reference internal" href="TIES_MD.openmmtools.html">TIES_MD.openmmtools package</a></li>
<li class="toctree-l4"><a class="reference internal" href="TIES_MD.tests.html">TIES_MD.tests package</a></li>
<li class="toctree-l4"><a class="reference internal" href="TIES_MD.ties_analysis.html">TIES_MD.ties_analysis package</a></li>
</ul>
</li>
Expand Down
2 changes: 1 addition & 1 deletion docs/TIES_MD.eng_scripts.openmm_sub_split.html
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@
<script src="_static/underscore.js"></script>
<script src="_static/_sphinx_javascript_frameworks_compat.js"></script>
<script src="_static/doctools.js"></script>
<script src="_static/sphinx_highlight.js"></script>
<script src="_static/js/theme.js"></script>
<link rel="index" title="Index" href="genindex.html" />
<link rel="search" title="Search" href="search.html" />
Expand Down Expand Up @@ -55,7 +56,6 @@
<li class="toctree-l3 current"><a class="reference internal" href="TIES_MD.html#subpackages">Subpackages</a><ul class="current">
<li class="toctree-l4 current"><a class="reference internal" href="TIES_MD.eng_scripts.html">TIES_MD.eng_scripts package</a></li>
<li class="toctree-l4"><a class="reference internal" href="TIES_MD.openmmtools.html">TIES_MD.openmmtools package</a></li>
<li class="toctree-l4"><a class="reference internal" href="TIES_MD.tests.html">TIES_MD.tests package</a></li>
<li class="toctree-l4"><a class="reference internal" href="TIES_MD.ties_analysis.html">TIES_MD.ties_analysis package</a></li>
</ul>
</li>
Expand Down
Loading

0 comments on commit 3be63e5

Please sign in to comment.