@@ -85,31 +85,39 @@ tests/test_bpy_import.py . [100%]
85
85
86
86
#### Fixtures
87
87
88
- <a name =" blender_executable " href =" #blender_executable " >#</a > <b >blender_executable</b > ⇒ ` str `
88
+ <a name =" blender_executable " href =" #blender_executable " >#</a >
89
+ <b >blender_executable</b > ⇒ ` str `
89
90
90
- Returns the path of the executable that has started the current Blender session.
91
+ Returns the path of the executable that has started the current Blender
92
+ session.
91
93
92
- <a name =" blender_version " href =" #blender_version " >#</a > <b >blender_version</b > ⇒ ` str `
94
+ <a name =" blender_version " href =" #blender_version " >#</a > <b >blender_version</b >
95
+ ⇒ ` str `
93
96
94
97
Returns the version of Blender running in the current session.
95
98
96
- <a name =" blender_python_executable " href =" #blender_python_executable " >#</a > <b >blender_python_executable</b > ⇒ ` str `
99
+ <a name =" blender_python_executable " href =" #blender_python_executable " >#</a >
100
+ <b >blender_python_executable</b > ⇒ ` str `
97
101
98
102
Returns the path of the Python executable builtin in the Blender release of the
99
103
currently running session.
100
104
101
- <a name =" blender_python_version " href =" #blender_python_version " >#</a > <b >blender_python_version</b > ⇒ ` str `
105
+ <a name =" blender_python_version " href =" #blender_python_version " >#</a >
106
+ <b >blender_python_version</b > ⇒ ` str `
102
107
103
108
Returns the version of the Python executable builtin in the Blender release of
104
109
the currently running session.
105
110
106
- <a name =" install_addons_from_dir " href =" #install_addons_from_dir " >#</a > <b >install_addons_from_dir</b >(<i >addons_dir</i >, <i >addon_module_names</i >, <i >save_userpref=True</i >, <i >default_set=True</i >, <i >persistent=True</i >, <i >\*\* kwargs</i >)
111
+ <a name =" install_addons_from_dir " href =" #install_addons_from_dir " >#</a >
112
+ <b >install_addons_from_dir</b >(<i >addons_dir</i >, <i >addon_module_names</i >,
113
+ <i >save_userpref=True</i >, <i >default_set=True</i >, <i >persistent=True</i >,
114
+ <i >\*\* kwargs</i >)
107
115
108
- Returns a function that installs and enables a set of addons whose modules are
109
- located in a directory. This function is designed to be executed before the
110
- pytest session to install the addons that you want to test, using the other
111
- fixture [ ` disable_addons ` ] ( https://github.com/mondeja/pytest-blender#disable_addons )
112
- to disable them after the execution of the suite:
116
+ Function that installs and enables a set of addons whose modules are located in
117
+ a directory. This function is designed to be executed before the pytest session
118
+ to install the addons that you want to test, using the other fixture
119
+ [ ` disable_addons ` ] ( https://github.com/mondeja/pytest-blender#disable_addons )
120
+ to disable them after the execution of the test suite:
113
121
114
122
``` python
115
123
import os
@@ -122,26 +130,32 @@ def _register_addons(request, install_addons_from_dir, disable_addons):
122
130
yield
123
131
disable_addons(ADDON_MODULE_NAMES )
124
132
```
125
- - ** addons_dir** (str) Directory in which are located the modules of the addons.
126
- - ** addon_module_names** (list) Name of the addons modules (without the ` .py ` extension).
133
+ - ** addons_dir** (str) Directory in which are located the modules of the
134
+ addons.
135
+ - ** addon_module_names** (list) Name of the addons modules (without the
136
+ ` .py ` extension).
127
137
- ** save_userpref** (bool) Save user preferences after installation.
128
138
- ** default_set** (bool) Set the user-preference calling ` addon_utils.enable ` .
129
139
- ** persistent** (bool) Ensure the addon is enabled for the entire session
130
140
(after loading new files).
131
141
- ** \*\* kwargs** (dict) Subsecuent keyword arguments are passed to
132
142
[ ` bpy.ops.preferences.addon_install ` ] ( https://docs.blender.org/api/current/bpy.ops.preferences.html#bpy.ops.preferences.addon_install ) .
133
143
134
- <a name =" disable_addons " href =" #disable_addons " >#</a > <b >disable_addons</b >(<i >addon_module_names</i >, <i >save_userpref=True</i >, <i >default_set=True</i >, <i >\*\* kwargs</i >)
144
+ <a name =" disable_addons " href =" #disable_addons " >#</a >
145
+ <b >disable_addons</b >(<i >addon_module_names</i >, <i >save_userpref=True</i >,
146
+ <i >default_set=True</i >, <i >\*\* kwargs</i >)
135
147
136
- Returns a function that disables a set of addons by module name. Is designed to
137
- disables your addons after a pytest suite execution (check
148
+ Function that disables a set of addons by module name. Is designed to disable
149
+ your addons after a pytest suite execution (check
138
150
[ ` install_addons_from_dir ` ] ( https://github.com/mondeja/pytest-blender#install_addons_from_dir )
139
151
for an example).
140
152
141
- - ** addon_module_names** (list) Name of the addons modules (without the ` .py ` extension).
153
+ - ** addon_module_names** (list) Name of the addons modules (without the ` .py `
154
+ extension).
142
155
- ** save_userpref** (bool) Save user preferences after installation.
143
156
- ** default_set** (bool) Set the user-preference calling ` addon_utils.disable ` .
144
- - ** \*\* kwargs** (dict) Subsecuent keyword arguments are passed to ` addon_utils.disable ` .
157
+ - ** \*\* kwargs** (dict) Subsecuent keyword arguments are passed to
158
+ ` addon_utils.disable ` .
145
159
146
160
### CI integration
147
161
@@ -187,8 +201,8 @@ jobs:
187
201
run : |
188
202
python -m pip install --upgrade blender-downloader
189
203
BLENDER_EXECUTABLE_PATH=$(blender-downloader \
190
- ${{ matrix.blender-version }} --extract \
191
- --print-blender-executable --remove-compressed --quiet )
204
+ ${{ matrix.blender-version }} --extract --remove-compressed \
205
+ --quiet --print-blender-executable )
192
206
echo "$BLENDER_EXECUTABLE_PATH" > _blender-executable-path.txt
193
207
- name : Install dependencies
194
208
id : install-dependencies
0 commit comments