diff options
Diffstat (limited to 'test/units/cli/test_galaxy.py')
-rw-r--r-- | test/units/cli/test_galaxy.py | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/test/units/cli/test_galaxy.py b/test/units/cli/test_galaxy.py index f0be9ebad8..8f7e891e7d 100644 --- a/test/units/cli/test_galaxy.py +++ b/test/units/cli/test_galaxy.py @@ -81,9 +81,8 @@ class TestGalaxy(unittest.TestCase): # creating a temp file with installation requirements cls.role_req = './delete_me_requirements.yml' - fd = open(cls.role_req, "w") - fd.write("- 'src': '%s'\n 'name': '%s'\n 'path': '%s'" % (cls.role_tar, cls.role_name, cls.role_path)) - fd.close() + with open(cls.role_req, "w") as fd: + fd.write("- 'src': '%s'\n 'name': '%s'\n 'path': '%s'" % (cls.role_tar, cls.role_name, cls.role_path)) @classmethod def makeTar(cls, output_file, source_dir): |