Commit 6ab6cd8
committed
Fix test_oclint_plist_cleanup to change to tmpdir before cleanup
OCLintCmd.cleanup_files() uses os.getcwd() to list files, so the test
must chdir to the temp directory before calling it. Without this,
os.getcwd() fails with FileNotFoundError when the current directory
doesn't exist or has been deleted.
Changes:
- Save original cwd
- chdir to tmpdir before calling cleanup_files()
- Restore original cwd in finally block
Fixes Ubuntu CI test failure.1 parent c7a4512 commit 6ab6cd8
1 file changed
Lines changed: 18 additions & 13 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
269 | 269 | | |
270 | 270 | | |
271 | 271 | | |
| 272 | + | |
272 | 273 | | |
273 | | - | |
274 | | - | |
275 | | - | |
| 274 | + | |
| 275 | + | |
| 276 | + | |
| 277 | + | |
| 278 | + | |
276 | 279 | | |
277 | | - | |
278 | | - | |
279 | | - | |
| 280 | + | |
| 281 | + | |
| 282 | + | |
280 | 283 | | |
281 | | - | |
282 | | - | |
| 284 | + | |
| 285 | + | |
283 | 286 | | |
284 | | - | |
285 | | - | |
| 287 | + | |
| 288 | + | |
286 | 289 | | |
287 | | - | |
288 | | - | |
289 | | - | |
| 290 | + | |
| 291 | + | |
| 292 | + | |
| 293 | + | |
| 294 | + | |
290 | 295 | | |
291 | 296 | | |
292 | 297 | | |
| |||
0 commit comments