test_dynamo_execution
Verify installed Dynamo executes fresh DesignScript without changing a model.
Important
This hosted test starts Dynamo and opens a temporary graph. It refuses to replace an existing user workspace. Revit and Dynamo are required; never run this module in CI. A successful command return alone is not execution proof.
Attributes
TEST_ENVIRONMENT = 'Revit'
module-attribute
TEST_LEVEL = 'Integration'
module-attribute
Classes
DynamoExecutionTests
Bases: TestCase
Require actual graph evaluation from the installed Dynamo runtime.
Methods:
test_fresh_designscript_token_is_evaluated()
A command status cannot substitute for the fresh graph's output.
Source code in pyrevitlib/pyrevit/unittests/test_dynamo_execution.py
Functions:
assert_dynamo_execution(ui_application=None)
Start Dynamo and require an evaluated, unique graph-output token.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
ui_application
|
UIApplication
|
Active app; defaults to the hosted pyRevit app. |
None
|
Returns:
| Name | Type | Description |
|---|---|---|
evidence |
dict
|
Actual versions and execution evidence for a local matrix. |
Raises:
| Type | Description |
|---|---|
AssertionError
|
No document, unsafe workspace, failed startup or wrong output. |
Important
Requires an active project. An always-rolled-back transaction group also removes Dynamo's startup preview materials. The graph has no Python nodes or package dependencies.
Source code in pyrevitlib/pyrevit/unittests/test_dynamo_execution.py
124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 | |