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 7871b01 commit 77b1755Copy full SHA for 77b1755
examples/python/tests/troubleshooting/test_logging.py
@@ -1,3 +1,4 @@
1
+import atexit
2
import logging
3
import os
4
@@ -24,4 +25,6 @@ def test_logging():
24
25
with open(log_path, 'r') as fp:
26
assert len(fp.readlines()) == 3
27
finally:
- os.remove(log_path)
28
+ atexit.register(delete_path, log_path)
29
+def delete_path(path):
30
+ os.remove(path)
0 commit comments