From d4fc847d96e7e7b5f576a88fb37e3d74edd91bf3 Mon Sep 17 00:00:00 2001 From: andrewkrug Date: Mon, 26 Feb 2018 10:06:57 -0800 Subject: [PATCH] close file handle for yaml file in test --- tests/test_yaml.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/tests/test_yaml.py b/tests/test_yaml.py index f02fabb1..dab9d81f 100644 --- a/tests/test_yaml.py +++ b/tests/test_yaml.py @@ -11,7 +11,9 @@ class YAMLTest(unittest.TestCase): def get_yaml_file(self): apps_yml = open('apps.yml') - return apps_yml.read() + contents = apps_yml.read() + apps_yml.close() + return contents def test_output_exists(self): assert self.get_yaml_file() is not None