summaryrefslogtreecommitdiffstats
path: root/test/question/basic.py
diff options
context:
space:
mode:
authorWilliam Deegan <bill@baddogconsulting.com>2019-04-28 19:43:43 (GMT)
committerGitHub <noreply@github.com>2019-04-28 19:43:43 (GMT)
commit35e6bbe16a859b42efca4592b435695a530f0717 (patch)
tree5a298b113bb1899e91583866b41eb9c337c0857e /test/question/basic.py
parent44c7b81e1a47ff5d4439740b1e929ea723ee1f18 (diff)
parent4ecdcf07580b1bfcd03f7886b6ab9256ee825175 (diff)
downloadSCons-35e6bbe16a859b42efca4592b435695a530f0717.zip
SCons-35e6bbe16a859b42efca4592b435695a530f0717.tar.gz
SCons-35e6bbe16a859b42efca4592b435695a530f0717.tar.bz2
Merge pull request #3345 from mwichmann/py38warns4-tests
[wip] Py38warns4 tests
Diffstat (limited to 'test/question/basic.py')
-rw-r--r--test/question/basic.py6
1 files changed, 2 insertions, 4 deletions
diff --git a/test/question/basic.py b/test/question/basic.py
index 21e6206..968c4f7 100644
--- a/test/question/basic.py
+++ b/test/question/basic.py
@@ -36,10 +36,8 @@ _python_ = TestSCons._python_
test.write('build.py', r"""
import sys
-contents = open(sys.argv[2], 'rb').read()
-file = open(sys.argv[1], 'wb')
-file.write(contents)
-file.close()
+with open(sys.argv[1], 'wb') as f, open(sys.argv[2], 'rb') as ifp:
+ f.write(ifp.read())
""")
test.write('SConstruct', """