Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Rough poc for automated testing #182

Draft
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

AdrianDeWinter
Copy link

Jut a rough sketch for what this might look like, for details see #181 .

This could run tests in two ways:

  • Via console, utilizing blender_addon_tester. Works headless, and across windows and linux (even in containers).
  • As python scripts through the VSCode Blender integration. This loses access to pytest, unless one messes with the permissions on the bundled python interpreter to get pip working inside of blender

To quickly run these tests via docker:
docker run --rm -v .:/code -w /code python:3.10 /bin/bash -c ./run_tests.sh
Or, if you want to cache blender versions instead of redownloading them every time:
docker run --rm -v .:/code -v some_dir:/blender_versions -e BLENDER_CACHE=/blender_versions -w /code python:3.10 /bin/bash -c ./run_tests.sh

To run them locally:

  • pip install pytest blender_addon_tester-0.10.2-py3-none-any.whl (I had to build the package from source, the version on PyPi... has issues)
  • python -m pytest .

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant