Bug 1692058 - Open temporary file in w mode when running multiple junit tests. r=droeh,mhentges

We're trying to store a string in a file open in binary mode which doesn't work :)

I'm guessing this was allowed in Python2 or some older 3 version.

Differential Revision: https://phabricator.services.mozilla.com/D104751
This commit is contained in:
Agi Sferro 2021-02-24 17:03:32 +00:00
Родитель 816cdb938f
Коммит a5bf648b7d
1 изменённых файлов: 1 добавлений и 1 удалений

Просмотреть файл

@ -206,7 +206,7 @@ class JUnitTestRunner(MochitestDesktop):
elif test_filters:
if len(test_filters) > 1:
# Generate the list file from test_filters
with tempfile.NamedTemporaryFile(delete=False) as filter_list:
with tempfile.NamedTemporaryFile(delete=False, mode="w") as filter_list:
for f in test_filters:
print(f, file=filter_list)
filter_list_name = filter_list.name