-
Notifications
You must be signed in to change notification settings - Fork 2
Open
Description
On Windows, the test database set up for testthat sometimes does not get deleted when calling unlink(). I have no idea why.
This is specifically when using setup_mock_environment(), which creates the test database as test.sqlite3. Unlinking this file for some reason does not work on Windows, which causes an error the next time setup_mock_environment() is called.
As a fix, I'm changing setup_mock_environment() to randomly name the test database. That way even if the previous instance cannot be deleted, a new one can be created the next time setup_mock_environment() is called.
There should after this be one test error remaining, when remove_db() is tested. Here the file really needs to be removed.
Metadata
Metadata
Assignees
Labels
No labels