Skip to content

Running Tests as Root #2079

Closed
Closed

Description

@MichaelSpece

Document and refactor test/test_util.py’s permission_error_tmpdir fixture so

  1. it detects root execution up front,
  2. skips with a clear message before any permission tweaks, and
  3. documents this desired behavior.

Activity

  1. Byron commented on Oct 25, 2025

    @Byron
    Member

    I think this is acceptable as we shouldn't run as root.
    Running tests in containers might be something else, but even there one doesn't have to run as root, and probably shouldn't.
    Thanks for your understanding.

  2. MichaelSpece commented on Oct 25, 2025

    @MichaelSpece
    Author

    I don't believe users care what you believe should and shouldn't be done.
    Moreover, you don't seem sure yourself.
    What is the disadvantage to allowing users to run tests as root? Given some systems run as root, this has obvious applications.

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions