broadinstitute / viral-ngs

Viral genomics analysis pipelines
Other
190 stars 67 forks source link

testing: fixed an issue with the handling of tempdirs #866

Closed notestaff closed 6 years ago

notestaff commented 6 years ago

Fixed an issue with the handling of temporary directories during testing, caused by an interaction of a legacy unittest-based class with the newer pytest-based fixtures.

notestaff commented 6 years ago

This PR adds a fix for #862

notestaff commented 6 years ago

Btw, integration/test_ncbi.py uses class-scope tempdirs rather than function-scope ones. Is it necessary for tests in each test class there to share a tempdir?

notestaff commented 6 years ago

@tomkinsc calling tempfile.gettempdir() still works: https://github.com/broadinstitute/viral-ngs/blob/master/test/integration/test_ncbi.py#L38

tomkinsc commented 6 years ago

The tempdirs would ideally be function-scoped. With the changes from this PR applied that appears to be true for tempfile.gettempdir()?

notestaff commented 6 years ago

That's true. I just want to check that it was not important for them to be class-scoped, as they were originally.