diff options
author | William Deegan <bill@baddogconsulting.com> | 2022-01-23 00:17:48 (GMT) |
---|---|---|
committer | William Deegan <bill@baddogconsulting.com> | 2022-01-23 00:17:48 (GMT) |
commit | 2f4b66afe976071ffb456235b2efc7099d528bbb (patch) | |
tree | cccd3049b0921d631be4c1e6eb16e4226fc640ad /test/ninja | |
parent | 8dd789185a386f0b15c46441d5b9166c40504776 (diff) | |
download | SCons-2f4b66afe976071ffb456235b2efc7099d528bbb.zip SCons-2f4b66afe976071ffb456235b2efc7099d528bbb.tar.gz SCons-2f4b66afe976071ffb456235b2efc7099d528bbb.tar.bz2 |
address a number of ResourceWarning: unclosed file <_io.TextIOWrapper name='progress.out' mode='w' encoding='UTF-8'> type warnings which are issued when running tests with python 3.9
Diffstat (limited to 'test/ninja')
-rw-r--r-- | test/ninja/ninja_test_sconscripts/sconstruct_ninja_command_line | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/test/ninja/ninja_test_sconscripts/sconstruct_ninja_command_line b/test/ninja/ninja_test_sconscripts/sconstruct_ninja_command_line index 14ae633..4967912 100644 --- a/test/ninja/ninja_test_sconscripts/sconstruct_ninja_command_line +++ b/test/ninja/ninja_test_sconscripts/sconstruct_ninja_command_line @@ -8,5 +8,7 @@ env = Environment(variables=env_vars) env.VariantDir(env['OTHER_VAR'], 'src') env.Tool('ninja') -env.Textfile('$BUILD/bar2.c', open('src/foo.c').read()) +with open('src/foo.c') as foo: + env.Textfile('$BUILD/bar2.c', foo.read()) + env.Program(target = 'foo', source = '$BUILD/bar2.c', CPPPATH='src') |