1
1
# pytest-blender
2
2
3
+ [ ![ PyPI] [ pypi-version-badge-link ]] [ pypi-link ]
4
+ [ ![ Python versions] [ pypi-pyversions-badge-link ]] [ pypi-link ]
5
+ [ ![ License] [ license-image ]] [ license-link ]
6
+ [ ![ Tests] [ tests-image ]] [ tests-link ]
7
+
3
8
Pytest plugin for Blender testing. Executes your pytest testsuite with
4
- Blender in headless mode using their builtin Python interpreter.
9
+ Blender in headless mode using its builtin Python interpreter.
5
10
6
11
## Install
7
12
@@ -23,7 +28,12 @@ $blender_python -m ensurepip
23
28
$blender_python -m pip install -r test-requirements.txt
24
29
```
25
30
26
- > You can also get the intepreter for a custom Blender installation location with ` --blender-executable ` option: ` pytest-blender --blender-executable ~/blender-2.91.2-linux64/blender `
31
+ You can also get the intepreter for a custom Blender installation location
32
+ with ` --blender-executable ` option:
33
+
34
+ ``` bash
35
+ pytest-blender --blender-executable ~ /blender-2.91.2-linux64/blender
36
+ ```
27
37
28
38
### Execute tests
29
39
@@ -39,16 +49,12 @@ Read prefs: ~/.config/blender/2.82/config/userpref.blend
39
49
========================= test session starts ==================================
40
50
platform linux -- Python 3.8.5, pytest-6.1.2, py-1.9.0, pluggy-0.13.1 -- /usr/bin/blender
41
51
cachedir: .pytest_cache
42
- metadata: {'Python': '3.8.5', 'Platform': 'Linux-5.4.0-65-generic-x86_64-with-glibc2.29',
43
- 'Packages': {'pytest': '6.1.2', 'py': '1.9.0', 'pluggy': '0.13.1'},
44
- 'Plugins': {'metadata': '1.11.0', 'cov': '2.10.1', 'html': '3.1.1'}}
45
52
rootdir: /home/mondeja/files/code/pytest-blender
46
- plugins: metadata-1.11.0, cov-2.10.1, html-3.1.1
47
53
collected 1 item
48
54
49
55
tests/test_import_bpy.py::test_inside_blender <module 'bpy' from '/usr/share/blender/scripts/modules/bpy/__init__.py'>
50
56
PASSED
51
- =========================== 1 passed in 0.01s =================================
57
+ =========================== 1 passed in 0.01s ==================================
52
58
```
53
59
54
60
Just can specify a custom blender executable path using ` --blender-executable `
@@ -69,5 +75,13 @@ collected 1 item
69
75
70
76
tests/test_import_bpy.py . [100%]
71
77
72
- ============================== 1 passed in 0.00s ==============================
78
+ ============================== 1 passed in 0.00s ===============================
73
79
```
80
+
81
+ [ pypi-link ] : https://pypi.org/project/pytest-blender
82
+ [ pypi-version-badge-link ] : https://img.shields.io/pypi/v/pytest-blender
83
+ [ pypi-pyversions-badge-link ] : https://img.shields.io/pypi/pyversions/pytest-blender
84
+ [ license-image ] : https://img.shields.io/pypi/l/pytest-blender?color=light-green
85
+ [ license-link ] : https://github.com/mondeja/pytest-blender/blob/master/LICENSE
86
+ [ tests-image ] : https://img.shields.io/github/workflow/status/mondeja/pytest-blender/CI
87
+ [ tests-link ] : https://github.com/mondeja/pytest-blender/actions?query=workflow%3ACI
0 commit comments