Can't get Python AutoDev CI/CD to work with custom buildpack

I have created a simple Python project on GitLab. I enabled the AutoDev Ops CI/CD pipeline for it. I haven’t created a .gitlab-ci.yml. The test job fails with the following error.

-----> Fetching custom buildpack
-----> python 1.5.13 app detected
Selected buildpack does not support test feature
Cleaning up project directory and file based variables
ERROR: Job failed: exit code 1

This appears to be the problem described in Issue 22684: herokuish/AutoDevOps can’t test some languages. According to this comment, the workaround is to use a custom buildpack. In my CI/CD settings I have tried setting the BUILDPACK_URL to both heroku-buildpack-python and a modified version of this buildpack that according to the comment has test support. Both give me the same error shown above. All the other pipeline jobs succeed.

How do I get the Python AutoDev test pipeline to work?

I fixed this by creating a .gitlab-ci.yml that looks like this

  - template: Auto-DevOps.gitlab-ci.yml

# Python is not supported in the way Gitlab runs test so overwrite with custom Python test execution.
  image: python:3.9.16-slim-buster
    - pip install .
    - pytest
  services: []

I didn’t do anything with buildpacks.