Shana Tova + Question about testing distributed mode

16 views
Skip to first unread message

Guy Adini

unread,
Sep 16, 2012, 7:48:43 AM9/16/12
to pyth...@googlegroups.com
First of all - shana tova everybody!

And if we're anyway here, a question about unit testing and distributed mode:

I have written a first attempt at a distributed version of pythonect.
I know that some features are still missing, and that everything still isn't 100% perfect, but I'd like to try and 
run the unit-tests on it (at the very least, the current version, available at https://github.com/guyadini/pythonect , should
be able to pass the tests, and log all client-server transactions to 'xmlrpc.log').

Does anybody have an idea about the best way to do that?
Currently, the unit-test files call pythonect.eval directly, which doesn't allow me to pass the --distributed flag to the program.

Thanks and happy holidays,
Guy

Itzik Kotler

unread,
Sep 16, 2012, 7:59:27 AM9/16/12
to pyth...@googlegroups.com
Shana Tova Guy and everyone else!


If I understand correctly, the problem is the prerequisite of starting the XML RPC server prior to eval()uating expressions.

I ran into a similar problem when I wanted to check the explicit remote ('@') operator. (See: https://github.com/ikotler/pythonect/blob/master/pythonect/test/test_xmlrpc_app.py)

The workaround was to use Python's Unittest setUpModule() method to start the XML RPC server prior to running the tests.


Another way to solve the problem is to import pythonect (The interpreter) as if it were a module and call main().

I don't think it's a good idea because it puts the focus on pythonect (The interpreter) rather than the technology/feature you want to test.


--
 
 

Reply all
Reply to author
Forward
0 new messages