Error in get_name() of class tango.DeviceImpl when running the test cases using Pytest

Hi All,

When I am executing the test cases for TANGO device using pytest, get_name() API of class tango.LatestDeviceImpl is giving the following error:

> print("Name is: ", self.get_name())
E Boost.Python.ArgumentError: Python argument types in
E DeviceImpl.get_name()
E did not match C++ signature:
E get_name(Tango::DeviceImpl {lvalue})



Can anyone help me with this error?

Thanks,
Apurva Patkar
Hi All,

I have shared a Test TANGO device code which replicates the error described in the previous post.

When Test device is running (Test.py file), get_name() API is executed properly.

user@theta:~/TEST/Test$ python Test.py 01
('self.get_name() is: ', 'test/device/1')
Ready to accept request



However, when pytest (Test_test file) command is executed, it gives following error:

user@theta:~/TEST/test$ pytest
=========================================================================================== test session starts ============================================================================================
platform linux – Python 3.5.2, pytest-4.2.0, py-1.7.0, pluggy-0.8.1
rootdir: /home/user/TEST, inifile:
plugins: xdist-1.27.0, metadata-1.8.0, json-report-1.0.3, forked-1.0.2, cov-2.6.1
collected 1 item

Test_test.py F [100%]

================================================================================================= FAILURES =================================================================================================
_____________________________________________________________________________________ TestDeviceTestCase.test_get_name _____________________________________________________________________________________

self = <test.Test_test.TestDeviceTestCase object at 0x7f8226d037b8>

def test_get_name(self):
# Test test_get_name() method of Test class
> result = Test.test_get_name(Test)

Test_test.py:55:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _

self = <class 'Test.Test.Test'>

def test_get_name(self):
> print ("self.get_name() is: ", self.get_name())
E Boost.Python.ArgumentError: Python argument types in
E DeviceImpl.get_name()
E did not match C++ signature:
E get_name(Tango::DeviceImpl {lvalue})

../Test/Test.py:31: ArgumentError


Any inputs on this will be helpful. smile
Edited 2 months ago
 
Register or login to create to post a reply.