Address ResourceWarning warnings

Signed-off-by: JoeLametta <JoeLametta@users.noreply.github.com>
This commit is contained in:
JoeLametta
2019-08-12 09:00:00 +00:00
parent fff3014e15
commit bb4c25df97
11 changed files with 49 additions and 47 deletions

View File

@@ -27,7 +27,8 @@ class AudioLengthPathTestCase(tcommon.TestCase):
def _testSuffix(self, suffix):
fd, path = tempfile.mkstemp(suffix=suffix)
with os.fdopen(fd, "wb") as temptrack:
temptrack.write(open(base_track_file, "rb").read())
with open(base_track_file, "rb") as f:
temptrack.write(f.read())
t = AudioLengthTask(path)
runner = task.SyncRunner()