def test_booktest(self): from parlai.core.params import ParlaiParser from parlai.tasks.booktest.agents import EvalTeacher, StreamTeacher opt = ParlaiParser().parse_args(args=self.args) opt['datatype'] = 'train:ordered' teacher = StreamTeacher(opt) reply = teacher.act() check(opt, reply) for dt in ['valid', 'test']: opt['datatype'] = dt teacher = EvalTeacher(opt) reply = teacher.act() check(opt, reply) shutil.rmtree(self.TMP_PATH)