Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

PSA tests should use a temporary directory #557

Closed
orbeckst opened this issue Dec 2, 2015 · 2 comments
Closed

PSA tests should use a temporary directory #557

orbeckst opened this issue Dec 2, 2015 · 2 comments

Comments

@orbeckst
Copy link
Member

orbeckst commented Dec 2, 2015

@sseyler can you please modify the tests for PSA so that they do not write the ./psadata directory to the current directory but instead use a temporary directory, possibly using tempdir? I think you just have to add the targetdir keyword somewhere.

When I manually run

./mda_nosetests -v --processes=1 --process-timeout=120 ./analysis/test_psa.py

Ran 3 tests in 7.313s

FAILED (errors=3)

I currently get errors like the following

ERROR: test_reversal_hausdorff (MDAnalysisTests.analysis.test_psa.TestPSAnalysis)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/nfs/homes2/oliver/.local/lib/python2.7/site-packages/MDAnalysisTests-0.13.0.dev0-py2.7.egg/MDAnalysisTests/analysis/test_psa.py", line 57, in tearDown
    shutil.rmtree('psadata') # remove psa data directory
  File "/usr/lib/python2.7/shutil.py", line 247, in rmtree
    rmtree(fullname, ignore_errors, onerror)
  File "/usr/lib/python2.7/shutil.py", line 256, in rmtree
    onerror(os.rmdir, path, sys.exc_info())
  File "/usr/lib/python2.7/shutil.py", line 254, in rmtree
    os.rmdir(path)
OSError: [Errno 39] Directory not empty: 'psadata/fitted_trajs'

I am not sure if these errors will go away, but using temporary directories would be a start.

@orbeckst
Copy link
Member Author

orbeckst commented Dec 3, 2015

See comments in #551 which possibly relate to this issue.

orbeckst added a commit that referenced this issue Dec 10, 2015
Tests for PSA now use tempdir

Fixes Issue #557
@orbeckst
Copy link
Member Author

closed via #575

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants