summaryrefslogtreecommitdiff
path: root/gnuradio-core/src/python/gnuradio/gr_unittest.py
diff options
context:
space:
mode:
Diffstat (limited to 'gnuradio-core/src/python/gnuradio/gr_unittest.py')
-rwxr-xr-xgnuradio-core/src/python/gnuradio/gr_unittest.py18
1 files changed, 9 insertions, 9 deletions
diff --git a/gnuradio-core/src/python/gnuradio/gr_unittest.py b/gnuradio-core/src/python/gnuradio/gr_unittest.py
index c2c4df2ba5..e4510a6eb9 100755
--- a/gnuradio-core/src/python/gnuradio/gr_unittest.py
+++ b/gnuradio-core/src/python/gnuradio/gr_unittest.py
@@ -1,24 +1,24 @@
#!/usr/bin/env python
#
# Copyright 2004,2010 Free Software Foundation, Inc.
-#
+#
# This file is part of GNU Radio
-#
+#
# GNU Radio is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 3, or (at your option)
# any later version.
-#
+#
# GNU Radio is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
-#
+#
# You should have received a copy of the GNU General Public License
# along with GNU Radio; see the file COPYING. If not, write to
# the Free Software Foundation, Inc., 51 Franklin Street,
# Boston, MA 02110-1301, USA.
-#
+#
import unittest
import gr_xmlrunner
@@ -45,7 +45,7 @@ class TestCase(unittest.TestCase):
if round(second.imag-first.imag, places) != 0:
raise self.failureException, \
(msg or '%s != %s within %s places' % (`first`, `second`, `places` ))
-
+
def assertComplexAlmostEqual2 (self, ref, x, abs_eps=1e-12, rel_eps=1e-6, msg=None):
"""
Fail if the two complex objects are unequal as determined by...
@@ -64,7 +64,7 @@ class TestCase(unittest.TestCase):
`ref`, `x`, abs(ref-x)/abs(ref), `rel_eps` ))
-
+
def assertComplexTuplesAlmostEqual (self, a, b, places=7, msg=None):
self.assertEqual (len(a), len(b))
for i in xrange (len(a)):
@@ -108,7 +108,7 @@ TestProgram = unittest.TestProgram
main = TestProgram
def run(PUT, filename=None):
- '''
+ '''
Runs the unittest on a TestCase and produces an optional XML report
PUT: the program under test and should be a gr_unittest.TestCase
filename: an optional filename to save the XML report of the tests
@@ -149,7 +149,7 @@ def run(PUT, filename=None):
xmlrunner.run(suite)
main()
-
+
# This will run and fail make check if problem
# but does not output to screen.
#main(testRunner = xmlrunner)