We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 14c8556 commit 937a7d7Copy full SHA for 937a7d7
tests/_test_tools.py
@@ -28,8 +28,13 @@ def _read_file(path: Optional[Path]) -> str:
28
if path is None:
29
return ''
30
31
- with open(path, 'r') as f:
32
- return f.read()
+ try:
+ with open(path, 'r') as f:
33
+ return f.read()
34
+ except FileNotFoundError as ex:
35
+ return '<missing>'
36
+ except Exception as ex:
37
+ return f'<error: {ex}>'
38
39
40
def assert_completed(job: Job, status: Optional[JobStatus], attached: bool = False) -> None:
0 commit comments