Skip to content

Commit

Permalink
run test add main
Browse files Browse the repository at this point in the history
  • Loading branch information
adw62 committed Oct 7, 2022
1 parent 3be63e5 commit f479dcc
Showing 1 changed file with 12 additions and 6 deletions.
18 changes: 12 additions & 6 deletions TIES_MD/tests/run.py
Original file line number Diff line number Diff line change
@@ -1,11 +1,17 @@
#!/usr/bin/env python

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)])
def main():
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)])

if __name__ == '__main__':
main()



0 comments on commit f479dcc

Please sign in to comment.