<html>
  <head>

    <meta http-equiv="content-type" content="text/html; charset=utf-8">
  </head>
  <body text="#000000" bgcolor="#FFFFFF">
    Hi,<br>
    <br>
    I'm creating a time-line based on pytest.<br>
    im using xdist with multiple slaves (in the amount of the tests).
    Each test is started by time and dependency. which mean some of the
    gateways will be waiting for others to be "Done".<br>
    <br>
    for that, io need some data sharing between them all, and cannot use
    "slaveoutput".<br>
    <br>
    i created my own dict object using file handler, and i want to
    create instance once on master and share it will all slaves.<br>
    <br>
    but i cannot pass object to "slaveinput"<br>
    <br>
    Do you have any advice?<br>
    <br>
    <br>
    <b><br>
    </b><b>def pytest_configure(config):</b><br>
    <br>
        config.global_time_line_json = config.getoption("timeline",None)<br>
        unicode_to_ascii(config.global_time_line_json)<br>
        if config.global_time_line_json is None:<br>
            raise Exception("no timeline data was provided to command")<br>
        config.properties = config.getoption("properties")<br>
        unicode_to_ascii(config.properties)<br>
        logfile = config.properties.get("logfile",None)<br>
        if logfile is None:<br>
            raise Exception("no logfile path was provided to command
    under properties")<br>
        config.flow_dir = config.properties.get("flow_dir",None)<br>
        logfile_basename = os.path.basename(logfile)<br>
        _logger = Logger(config.flow_dir,logfile_basename)<br>
        config.logger = _logger.logger()<br>
        config.active_dir = "%s/%s" % (config.flow_dir,ACTIVE_DIR)<br>
        <b>if not hasattr(config,"slaveinput"):</b><b><br>
    </b><b>        config.logger.info2("Master")</b><b><br>
    </b><b>        config.global_data = PersistentDict('%s/%s' %
      (config.active_dir,FLOW_JSON), 'c', format='json')</b><br>
    <br>
    <b>def pytest_configure_node(node):</b><br>
        # runs only on Master<br>
        node.config.logger.info2("on Master sending data to Slave")<br>
       <b> node.slaveinput["global_data"] = node.config.global_data</b><br>
    <br>
    <pre class="moz-signature" cols="72">-- 
Best Regards,

Ayelet Regev Dabah
Email: <a class="moz-txt-link-abbreviated" href="mailto:ayelet@fabrixsystems.com">ayelet@fabrixsystems.com</a></pre>
  </body>
</html>