def setUp(self): fileobj = StringIO(sample_data) self.t = spawk.Spawk(fileobj) @self.t.begin() def begin(context): context.words = 0
def setUp(self): fileobj = StringIO(sample_data) self.t = spawk.Spawk(ApacheLogRecords(fileobj, FORMAT_COMBINED)) self.t.context.data = ''
def setUp(self): fileobj = StringIO(sample_data) self.t = spawk.Spawk(fileobj)
def setUp(self): self.old_stdin = sys.stdin sys.stdin = StringIO(sample_data) self.t = spawk.Spawk() self.t.context.data = ''
def setUp(self): fileobj = StringIO(sample_sql) self.t = spawk.Spawk(fileobj) self.t.context.data = ''