<s> import unittest <EOL> import pyfora <EOL> import ufora . config . Setup as Setup <EOL> import ufora . FORA . python . PurePython . ExecutorTestCommon as ExecutorTestCommon <EOL> import ufora . FORA . python . PurePython . LogisticRegressionTests as LogisticRegressionTests <EOL> import ufora . test . ClusterSimulation as ClusterSimulation <EOL> class ExecutorSimulationTest ( <EOL> unittest . TestCase , <EOL> ExecutorTestCommon . ExecutorTestCommon , <EOL> LogisticRegressionTests . LogisticRegressionTests ) : <EOL> @ classmethod <EOL> def setUpClass ( cls ) : <EOL> cls . config = Setup . config ( ) <EOL> cls . executor = None <EOL> cls . simulation = ClusterSimulation . Simulator . createGlobalSimulator ( ) <EOL> cls . simulation . startService ( ) <EOL> cls . simulation . getDesirePublisher ( ) . desireNumberOfWorkers ( <NUM_LIT:1> ) <EOL> @ classmethod <EOL> def tearDownClass ( cls ) : <EOL> cls . simulation . stopService ( ) <EOL> @ classmethod <EOL> def create_executor ( cls , allowCached = True ) : <EOL> if not allowCached : <EOL> return pyfora . connect ( '<STR_LIT>' ) <EOL> if cls . executor is None : <EOL> cls . executor = pyfora . connect ( '<STR_LIT>' ) <EOL> cls . executor . stayOpenOnExit = True <EOL> return cls . executor <EOL> if __name__ == '<STR_LIT:__main__>' : <EOL> import ufora . config . Mainline as Mainline <EOL> Mainline . UnitTestMainline ( ) </s>
