Commit aa7c4f8
committed
tests: fix flaky test in test_get_used_objs
Clear logs before assertions so that logs from other tests do not interfere with the test.
Some destructors may also run in between due to GC, so hopefully this will fix that issue too,
or reduce the chances of it happening.
See
https://github.com/iterative/dvc/actions/runs/14873217814/job/41775314725#step:6:97.
```console
> assert first(caplog.messages) == expected_message
E assert 'RC: discarding all clients' == "Output 'path... 'stage.dvc'."
E
E + RC: discarding all clients
E - Output 'path'(stage: 'stage.dvc') is missing version info. Cache for it will not be collected. Use `dvc repro` to get your pipeline up to date.
E - You can also use `dvc commit stage.dvc` to associate existing 'path' with stage: 'stage.dvc'.
```1 parent 415d4bc commit aa7c4f8
1 file changed
+1
-0
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
101 | 101 | | |
102 | 102 | | |
103 | 103 | | |
| 104 | + | |
104 | 105 | | |
105 | 106 | | |
106 | 107 | | |
| |||
0 commit comments