summaryrefslogtreecommitdiff
path: root/gr-blocks/python/blocks/qa_file_source_sink.py
diff options
context:
space:
mode:
authorDouglas Anderson <danderson@ntia.doc.gov>2017-02-12 15:52:19 -0800
committerJohnathan Corgan <johnathan@corganlabs.com>2017-02-26 18:21:22 -0800
commit9e625c4821f4c63421b3d3747c0c4f358fef6c5f (patch)
tree41dedbe053417be7314cdce15d64fbbb89db4d8d /gr-blocks/python/blocks/qa_file_source_sink.py
parente5aabcc6a4a9335f3ef8abf5f89104b626e9364d (diff)
python3: update non-GRC components to use python2 or python3
Diffstat (limited to 'gr-blocks/python/blocks/qa_file_source_sink.py')
-rw-r--r--gr-blocks/python/blocks/qa_file_source_sink.py11
1 files changed, 6 insertions, 5 deletions
diff --git a/gr-blocks/python/blocks/qa_file_source_sink.py b/gr-blocks/python/blocks/qa_file_source_sink.py
index 89841d3be6..2bc96afdc2 100644
--- a/gr-blocks/python/blocks/qa_file_source_sink.py
+++ b/gr-blocks/python/blocks/qa_file_source_sink.py
@@ -20,6 +20,7 @@
# Boston, MA 02110-1301, USA.
#
+
from gnuradio import gr, gr_unittest, blocks
import os
@@ -33,8 +34,8 @@ class test_file_source_sink(gr_unittest.TestCase):
self.tb = None
def test_001(self):
- src_data = range(1000)
- expected_result = range(1000)
+ src_data = list(range(1000))
+ expected_result = list(range(1000))
filename = "tmp.32f"
src = blocks.vector_source_f(src_data)
@@ -57,8 +58,8 @@ class test_file_source_sink(gr_unittest.TestCase):
self.assertFloatTuplesAlmostEqual(expected_result, result_data)
def test_descriptor_001(self):
- src_data = range(1000)
- expected_result = range(1000)
+ src_data = list(range(1000))
+ expected_result = list(range(1000))
filename = "tmp.32f"
fhandle0 = open(filename, "wb")
@@ -89,7 +90,7 @@ class test_file_source_sink(gr_unittest.TestCase):
self.assertFloatTuplesAlmostEqual(expected_result, result_data)
def test_file_source_can_seek_after_open(self):
- src_data = range(1000)
+ src_data = list(range(1000))
filename = "tmp.32f"
src = blocks.vector_source_f(src_data)