Commit 282e48f
: python/tests/test_actors.py: more contextmgr improvements
Summary: this refactors the python-side config helpers to make Runtime-layer overrides explicit and reversible, replaces the previous "restore from snapshot" approach with a clearer model that writes into the Runtime layer on entry and clears it on exit, and exposes a Rust-backed `clear()` to support that. the main functional change is adding `configured_with_redirected_stdio()`, which composes configuration overrides with stdio redirection in a single context manager so the tests don't need nested with blocks. all affected tests are updated to use the combined form, but the underlying logging behaviour is unchanged.
Differential Revision: D877959731 parent c7dae4c commit 282e48f
File tree
4 files changed
+426
-326
lines changed- hyperactor/src/config
- monarch_hyperactor/src
- python
- monarch/_rust_bindings/monarch_hyperactor
- tests
4 files changed
+426
-326
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
524 | 524 | | |
525 | 525 | | |
526 | 526 | | |
527 | | - | |
528 | | - | |
| 527 | + | |
529 | 528 | | |
530 | 529 | | |
531 | 530 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
211 | 211 | | |
212 | 212 | | |
213 | 213 | | |
| 214 | + | |
| 215 | + | |
| 216 | + | |
| 217 | + | |
| 218 | + | |
| 219 | + | |
| 220 | + | |
| 221 | + | |
| 222 | + | |
| 223 | + | |
| 224 | + | |
| 225 | + | |
214 | 226 | | |
215 | 227 | | |
216 | 228 | | |
| |||
252 | 264 | | |
253 | 265 | | |
254 | 266 | | |
| 267 | + | |
| 268 | + | |
| 269 | + | |
| 270 | + | |
| 271 | + | |
| 272 | + | |
| 273 | + | |
255 | 274 | | |
256 | 275 | | |
Lines changed: 30 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
28 | 28 | | |
29 | 29 | | |
30 | 30 | | |
31 | | - | |
32 | | - | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
0 commit comments