<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
</head>
<body bgcolor="#ffffff" text="#000000">
Hi ldtp-experts,<br>
<br>
I've an application (python / wxpython) that reads a configuration file
when it launched and set/unset the python environment variables:<br>
HTTP_PROXY/http_proxy to the URL of the http proxy to be used if any is
defined, or keep a direct connection to the internet.<br>
<br>
This application provides a Preferences menu to set the information
about the http (and https) proxy settings + 2 radio buttons to toggle
between the two network configurations. The dialog is very similar to
the Connection Settings in Firefox.<br>
<br>
The same function is called when the application is started and when it
changes the proxy setting in the Preferences menu:<br>
proxy holds the definition of the http proxy URL built up.<br>
os.environ['HTTP_PROXY'] = os.environ['http_proxy'] =&nbsp; proxy<br>
os.environ['FTP_PROXY'] = os.environ['ftp_proxy'] =&nbsp; proxy<br>
urllib2.install_opener(urllib2.build_opener(urllib2.ProxyHandler()))<br>
<br>
I've written a script A: <br>
1) launch my application with launchapp()<br>
2) change the Connection Settings by calling this menu Preferences<br>
3) go back to the main frame<br>
4) call another dialog that does not deal with the network<br>
5) select a view that uses the proxy set to fetch over the network the
needed data<br>
6) check if any Error window is showing up, if none call a Quit menu
and exit the application<br>
<br>
On OpenSolaris 2009.06 and ubuntu 9.04 with ldtp 1.7.1,&nbsp; I've noticed
if I launch this test in a python script, all the steps are executed as
expected without any problem. I can run the script in a loop without
problem.<br>
<br>
When this test is launched by pyunit
(TestSuite/TestCase/TextTestRunner), any additional tests executed
after, over the same application fail in the call of&nbsp;
guiexist/waittillguiexist(main_frame): the call pauses for a while and
after gets the error: <b>TypeError unpack non-sequence</b> as a
response although the application is launched with success.<br>
<br>
In my execution environment LDTP_DEBUG is set to 2, am I breaking the
connection between the server and the client during this test and only
sys.exit() clean up the situation by closing the sockets ? does
reinitldtp( ) fix my issue as I don't understand what's really doing ?<br>
<br>
Looking forward to your advice, best regards.<br>
<br>
nouar.<br>
<pre class="moz-signature" cols="130">
</pre>
</body>
</html>