tests: Close the temp file handle in qa_burst_file_source

This fixes the following warning

./usr/lib64/python3.7/unittest/case.py:645: ResourceWarning: unclosed file <_io.BufferedWriter name='/tmp/tmpkkz_akd6'>
  testMethod()
ResourceWarning: Enable tracemalloc to get the object allocation traceback

Change-Id: I66c2be2e5bf6915e3df253b3a69f5516534e3750
This commit is contained in:
Vasil Velichkov 2019-09-10 01:23:30 +03:00 committed by Piotr Krysik
parent f6314031e7
commit 601c786d51
1 changed files with 2 additions and 0 deletions

View File

@ -51,6 +51,7 @@ class qa_burst_file_sink (gr_unittest.TestCase):
0x00, 0x01, 0x01, 0x01, 0x01, 0x00, 0x01, 0x00, 0x01, 0x00, 0x01, 0x00, 0x00, 0x01
]))
handle.flush();
handle.close();
src = grgsm.burst_file_source(temp.name);
dst = grgsm.burst_sink();
@ -88,6 +89,7 @@ class qa_burst_file_sink (gr_unittest.TestCase):
0x00, 0x01, 0x01, 0x01, 0x01, 0x00, 0x01, 0x00, 0x01, 0x00, 0x01, 0x00, 0x00, 0x01
]))
handle.flush();
handle.close();
src = grgsm.burst_file_source(temp.name);
dst = grgsm.burst_sink();