Handle the possibility that someone might run the test suite as root
It turns out that issue #1 (closed) was due to the gitlab CI running the test suites as root by default. I have fixed this in MR !1 (merged) by creating an extra non-root user and using that to run the tests, but it would be a good idea to clarify what is happening here in case this happens to someone later. I suggest we make the following changes:
- Add an additional test that asserts that the user is not running as root (possibly may want to make this cross-platform). If possible we'll also want an easy way to convert this to a warning.
- Automatically skip tests that won't work if it's impossible to get a PermissionError (in case someone uses the "run as root anyway" feature). Note: It seems like it is not possible to mark a test as "skipped", we'll just have to make it pass, possibly issuing a warning.