• Jérome Perrin's avatar
    software/caddy-frontend/test: open files in context manager to silent ResourceWarning · c6c948e1
    Jérome Perrin authored
    Now that this test is python 3, test output has lots of warnings like this:
    
        software/caddy-frontend/test/test.py:305: ResourceWarning: unclosed file <_io.TextIOWrapper name='software/caddy-frontend/test/test_data/test.TestEnableHttp2ByDefaultFalseSlave.test00cluster_request_instance_parameter_dict.txt' mode='r' encoding='UTF-8'>
          test_data = open(test_data_file).read().strip()
        ResourceWarning: Enable tracemalloc to get the object allocation traceback
    c6c948e1
test.py 235 KB