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 e74d919 commit da33e0bCopy full SHA for da33e0b
riotctrl/tests/ctrl_test.py
@@ -224,12 +224,13 @@ def test_term_cleanup(app_pidfile_env):
224
with ctrl.run_term(logfile=sys.stdout) as child:
225
child.expect_exact('Running')
226
# Ensure script is started correctly
227
- content = open(tmpfile.name, 'r', encoding='utf-8').read()
228
- assert content == 'Running\n'
+ with open(tmpfile.name, 'r', encoding='utf-8') as tempfile_r:
+ assert tempfile_r.read() == 'Running\n'
229
230
# File should not exist anymore so no error to create one
231
# File must exist to be cleaned by tempfile
232
- open(tmpfile.name, 'x')
+ with open(tmpfile.name, 'x', encoding='utf-8'):
233
+ pass
234
235
236
class CtrlMock1(riotctrl.ctrl.RIOTCtrl):
0 commit comments