def setUp(self):
<EOL>if not tornado.ioloop.IOLoop.initialized():<EOL><INDENT>self.loop = PuritanicalIOLoop()<EOL>tornado.ioloop.IOLoop._instance = self.loop<EOL><DEDENT>else:<EOL><INDENT>self.loop = tornado.ioloop.IOLoop.instance()<EOL>self.assert_(<EOL>isinstance(self.loop, PuritanicalIOLoop),<EOL>"<STR_LIT>"<EOL>)<EOL><DEDENT>self.temp_dirs = []<EOL>self.mongods = []<EOL>for options in self.mongod_options:<EOL><INDENT>dirname = os.tempnam()<EOL>os.makedirs(dirname)<EOL>self.temp_dirs.append(dirname)<EOL>options = ['<STR_LIT>', '<STR_LIT>', '<STR_LIT:2>', '<STR_LIT>', dirname,<EOL>'<STR_LIT>', '<STR_LIT>', '<STR_LIT>', '<STR_LIT>', '<STR_LIT>'] + list(options)<EOL>logging.debug(options)<EOL>pipe = subprocess.Popen(options)<EOL>self.mongods.append(pipe)<EOL>logging.debug('<STR_LIT>' % pipe.pid)<EOL><DEDENT>sleep_time = <NUM_LIT:1> + (len(self.mongods) * <NUM_LIT:2>)<EOL>logging.info('<STR_LIT>' % sleep_time)<EOL>time.sleep(sleep_time)<EOL>
setup method that starts up mongod instances using `self.mongo_options`