We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 2602786 commit c16ef98Copy full SHA for c16ef98
testtools/run.py
@@ -205,11 +205,8 @@ def __init__(
205
# OptimisingTestSuite.add, but with a standard protocol).
206
# This is needed because the load_tests hook allows arbitrary
207
# suites, even if that is rarely used.
208
- source = open(self.load_list, "rb")
209
- try:
+ with open(self.load_list, "rb") as source:
210
lines = source.readlines()
211
- finally:
212
- source.close()
213
test_ids = {line.strip().decode("utf-8") for line in lines}
214
self.test = filter_by_ids(self.test, test_ids)
215
if not self.listtests:
0 commit comments