is there a current documentation about setup the asterisk unit tests? This 
documentation seems to be outdated:

I also followed some blog posts from on asterisk.org, but they also did not 
help as they seem to be outdated as well.

The docs specify that the unit test framework is still using python2.
But according to the contrib/scripts/install_prereq its already switched to 
python3, which is also indicated in the runtest.py command.

Unfortunately, the starpy fails for python3:

    <testcase classname="rtp.strict_rtp" name="strict_rtp_yes" time="0.62">
      <failure>Running tests/rtp/strict_rtp/strict_rtp_yes ...
data=None, variable={}, async=False, channelid=None,
SyntaxError: invalid syntax

Apparently async is a reserved keyword now on python 3.7. The used distribution 
is Debian Buster, so nothing bleeding edge.
I found a (one year old) pull-request at 
https://github.com/asterisk/starpy/pull/46/files that aparently fixes that bug.

There is also another issue related to starpy:

[Sep 28 16:28:00] ERROR[28954]: asterisk.test_case:607 _ami_connect: Exception 
raised in ami_connect:
 line 729, in inner
return func(*args, **kwargs)
TypeError: originate() got an unexpected keyword argument 'nowait'
Test tests/apps/control_playback/nominal failed

I am a bit confused if this is the maintained way to use this framework.

After spending one day on that I found by chance this post: 
This seems to depend on a starpy version 1.1, which is not visible at all in 
the actual github its located.

Is this the appropriate way of running this framework now?
If yes, it would be great to add a note or link it at the generic test suite 
documentation above, to save other people time to figure all this stuff out.



Henning Westerholt - https://skalatan.de/blog/
Kamailio services - https://gilawa.com<https://gilawa.com/>

-- Bandwidth and Colocation Provided by http://www.api-digital.com --

asterisk-dev mailing list
To UNSUBSCRIBE or update options visit:

Reply via email to