Freeseer / freeseer

Designed for capturing presentations at conferences. Pre-fill a list of talks to record, record them, and upload them to YouTube with our YouTube Uploader.
http://freeseer.readthedocs.org
GNU General Public License v3.0
215 stars 110 forks source link

Tests in test_server.py writing to user's configuration dir. #629

Closed FranciscoCanas closed 9 years ago

FranciscoCanas commented 9 years ago

The unit tests in test_server.py write to a temporary file inside the user's configuration directory, but instead should be writing to an entirely separate temporary dir.

The test storage file is mocked here: https://github.com/Freeseer/freeseer/blob/master/src/freeseer/tests/frontend/controller/test_server.py#L65

The storage file folder is loaded here: https://github.com/Freeseer/freeseer/blob/master/src/freeseer/frontend/controller/recording.py#L81

@dbrenden : You might look at this, if you are working on the server tests. @wigglier : Possibly an issue to keep in mind while working on other unit tests, since no unit tests should change the user's real configuration dir.

zxiiro commented 9 years ago

Ugh... that's a nasty one. Good catch!

SRomansky commented 9 years ago

This looks like a job for tmpdir! (http://pytest.org/latest/tmpdir.html I learnt about this last week from feedback.) I can take a look at this once gh#619 is closed.