Skip to content

Temporary files not being cleared inside a container #219

@BasitAli

Description

@BasitAli

What is your setup and what steps did you do?
When running pytest under a container or GitHub Actions ends up with the the following files

  1. .testmondata
  2. .testmondata-shm
  3. .testmondata-wal

This is how I run the tests on Docker,

docker-compose run --rm django pytest --testmon --no-cov

What was the outcome?

With these additional temporary files, subsequent runs with --testmon-nocollect still work in our pull requests, but if I run --test-mon --no-cov it fails with xdist error different tests were collected between gw1 and gw0.

What did you expect instead?

I would have expected the temporary files to be cleared and I should only end up with .testmondata. Disabling the following line db.py seems to resolve this.

connection.execute("PRAGMA journal_mode = WAL")

What is your operating system and it's version please?

I see the same issue on Docker inside WSL as well as on GitHub Actions. Everything works fine when I execute these commands on Ubuntu itself.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions