From 62f23fed27808d11fdd3e3089838bec7f188d787 Mon Sep 17 00:00:00 2001 From: Neil Johnson Date: Thu, 2 Apr 2026 14:29:18 +0100 Subject: [PATCH] include workaround for macos (#19615) Co-authored-by: Andrew Morgan <1342360+anoadragon453@users.noreply.github.com> --- changelog.d/19615.doc | 1 + docs/development/contributing_guide.md | 15 +++++++++++++++ 2 files changed, 16 insertions(+) create mode 100644 changelog.d/19615.doc diff --git a/changelog.d/19615.doc b/changelog.d/19615.doc new file mode 100644 index 0000000000..9e28ac8312 --- /dev/null +++ b/changelog.d/19615.doc @@ -0,0 +1 @@ +Include a workaround for running the unit tests with SQLite under recent versions of MacOS. diff --git a/docs/development/contributing_guide.md b/docs/development/contributing_guide.md index ab506b5f05..7e0dd4059d 100644 --- a/docs/development/contributing_guide.md +++ b/docs/development/contributing_guide.md @@ -309,6 +309,21 @@ works without further arguments). Your Postgres account needs to be able to create databases; see the postgres docs for [`ALTER ROLE`](https://www.postgresql.org/docs/current/sql-alterrole.html). +### Running the tests on MacOS + +To run the unit tests with SQLite on MacOS you will need to swap out the default MacOS +python interpreter with the homebrew version. This is due to the default using a +locked down version of Python and sqlite3. After installing python from homebrew: + +``` + poetry env remove --all + poetry env use /opt/homebrew/bin/python3.13 + poetry install + poetry run trial tests +``` + +This example uses python 3.13, but choose whichever version you want. + ## Run the integration tests ([Sytest](https://github.com/matrix-org/sytest)). The integration tests are a more comprehensive suite of tests. They