diff --git a/py/test/resultlog.py b/py/test/resultlog.py index fbec8a6c0..aed5581d4 100644 --- a/py/test/resultlog.py +++ b/py/test/resultlog.py @@ -28,7 +28,7 @@ class ResultLog(object): def __init__(self, bus, logfile): bus.subscribe(self.log_event_to_file) - self.logfile = logfile #open(logpath, 'w') # line buffering ? + self.logfile = logfile # preferably line buffered def write_log_entry(self, shortrepr, name, longrepr): print >>self.logfile, "%s %s" % (shortrepr, name) diff --git a/py/test/session.py b/py/test/session.py index 06cc76307..d4dbbaa9a 100644 --- a/py/test/session.py +++ b/py/test/session.py @@ -37,7 +37,7 @@ class Session(object): self.bus.subscribe(eventwrite) resultlog = self.config.option.resultlog if resultlog: - f = py.path.local(resultlog).open('w') + f = open(resultlog, 'w', 1) # line buffered self.resultlog = ResultLog(self.bus, f) def fixoptions(self): diff --git a/py/test/testing/test_config.py b/py/test/testing/test_config.py index bdd5fc915..ddc5e2eb4 100644 --- a/py/test/testing/test_config.py +++ b/py/test/testing/test_config.py @@ -196,8 +196,6 @@ class TestSessionAndOptions(suptest.FileCreation): rep_ev = event.ItemTestReport(item, passed=outcome) session.bus.notify(rep_ev) - - session.resultlog.logfile.flush() s = resultlog.read() assert s.find(". a") != -1