discuss-gnuradio
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Discuss-gnuradio] 3.6.4.2 test fail


From: Tom Rondeau
Subject: Re: [Discuss-gnuradio] 3.6.4.2 test fail
Date: Tue, 3 Sep 2013 09:24:29 -0400

On Tue, Sep 3, 2013 at 7:59 AM, Martin Braun (CEL) <address@hidden> wrote:
> On Tue, Sep 03, 2013 at 01:03:31PM +0200, Nemanja Savic wrote:
>> I figured out that in my version of python < 2.7 (because i use rhel6) this
>> function is not defined. Is there any workarround or I can simply do sudo 
>> make
>> install?
>
> I think Python 2.6 works, too. Surprised that your make test fails,
> though. Just go ahead and try.
>
> MB
>
>>
>>
>>
>> On Tue, Sep 3, 2013 at 11:11 AM, Nemanja Savic <address@hidden> wrote:
>>
>>
>>     Hi all guys,
>>
>>
>>     I am currently using 3.6.4git version of gnuradio at one of my computers.
>>     In order to use messages passing system from python i deceided to move to
>>     3.6.4.2 but the test fails with following error:
>>
>>
>>     182/194 Testing qa_file_metadata
>>     Test command: /bin/sh 
>> /home/savi_ne/tools/gnuradio-3.6.4.2/build/gr-blocks/
>>     python/qa_file_metadata_test.sh
>>     Test timeout computed to be: 9.99988e+06
>>     EE
>>     ======================================================================
>>     ERROR: test_001 (__main__.test_file_metadata)
>>     ----------------------------------------------------------------------
>>     Traceback (most recent call last):
>>       File "/home/savi_ne/tools/gnuradio-3.6.4.2/gr-blocks/python/
>>     qa_file_metadata.py", line 81, in test_001
>>         self.assertGreater(len(extra_str), 0)
>>     AttributeError: 'test_file_metadata' object has no attribute
>>     'assertGreater'
>>
>>     ======================================================================
>>     ERROR: test_002 (__main__.test_file_metadata)
>>     ----------------------------------------------------------------------
>>     Traceback (most recent call last):
>>       File "/home/savi_ne/tools/gnuradio-3.6.4.2/gr-blocks/python/
>>     qa_file_metadata.py", line 160, in test_002
>>         self.assertGreater(len(extra_str), 0)
>>     AttributeError: 'test_file_metadata' object has no attribute
>>     'assertGreater'
>>
>>     ----------------------------------------------------------------------
>>     Ran 2 tests in 0.007s
>>
>>     FAILED (errors=2)
>>     <pmt_swig.swig_int_ptr; proxy of <Swig Object of type 
>> 'boost::intrusive_ptr
>>     < pmt::pmt_base > *' at 0x1783360> >
>>     <pmt_swig.swig_int_ptr; proxy of <Swig Object of type 
>> 'boost::intrusive_ptr
>>     < pmt::pmt_base > *' at 0x1783bd0> >
>>     -- Process completed
>>     ***Failed
>>
>>
>>     Is there any aidea why is this happening and may I use gnuradio 3.6.4.2
>>     even with this error?
>>
>>
>>     Thank you
>>
>>
>>     --
>>     Nemanja Savić
>>
>>
>> --
>> Nemanja Savić
>>


Namanja is correct, assertGreater was introduced in Python 2.7.

You can do two things to fix this. The best would be to update to
3.6.51. There's no harm to your code or projects by upgrading, and
you'll get all of the new features and fixes in 3.6.5.

The second way is to copy the diff from commit
fb4e968e1785e0b02b82254fddb19e07fda61723 onto your version of the
code:

diff --git a/gr-blocks/python/qa_file_metadata.py
b/gr-blocks/python/qa_file_metadata.py
index c7826b1..14786bd 100644
--- a/gr-blocks/python/qa_file_metadata.py
+++ b/gr-blocks/python/qa_file_metadata.py
@@ -74,11 +74,10 @@ class test_file_metadata(gr_unittest.TestCase):
         except RuntimeError:
             self.assertFalse()

-        print header
         info = parse_file_metadata.parse_header(header, False)

         extra_str = handle.read(info["extra_len"])
-        self.assertGreater(len(extra_str), 0)
+        self.assertEqual(len(extra_str) > 0, True)
         handle.close()

         try:
@@ -157,7 +156,7 @@ class test_file_metadata(gr_unittest.TestCase):
         info = parse_file_metadata.parse_header(header, False)

         extra_str = handle.read(info["extra_len"])
-        self.assertGreater(len(extra_str), 0)
+        self.assertEqual(len(extra_str) > 0, True)
         handle.close()

         try:



-- 
Tom
Visit us at GRCon13 Oct. 1 - 4
http://www.trondeau.com/grcon13



reply via email to

[Prev in Thread] Current Thread [Next in Thread]