import_3dm icon indicating copy to clipboard operation
import_3dm copied to clipboard

pytest setup

Open rockjail opened this issue 1 year ago • 2 comments

pytest setup

This PR adds setup instructions for using pytest to test the addon. It relies on pytest-blender.
It also includes a very simple test case to keep the change small

Test setup assumes that the addon is installed as an extension. Paths need to be adjusted if installed as an addon (pre blender 4.2)

changes

  • adds simple test case using existing test files
  • adds pytest setup instructions

rockjail avatar Oct 16 '24 08:10 rockjail

Looks good. I will have to dive a bit deeper into how this works. I have a couple of test files that I'd like to add with this. I want to add asserts to ensure data is imported as expected.

jesterKing avatar Oct 17 '24 20:10 jesterKing

Great! Yeah I didn't want to put too much in the initial PR and kept the test very simple. I plan to add more tests as well :)

So turns out, you can also use blenders python to start all of this. It will make the install and maintenance of this a little easier as one only needs to install pip, pytest and other dependencies once.

rockjail avatar Oct 18 '24 05:10 rockjail

The changes are now in master. Thank you!

jesterKing avatar Nov 04 '24 09:11 jesterKing