mirror of
https://gitlab.gnome.org/GNOME/glib.git
synced 2025-01-13 07:56:17 +01:00
tests: Avoid writing ever increasing sequence of null bytes to test logs
This commit is contained in:
parent
3b7f7a4ed9
commit
c69a98057f
@ -121,6 +121,9 @@ class TAPTestResult(unittest.TestResult):
|
|||||||
self.print_raw(" ...\n")
|
self.print_raw(" ...\n")
|
||||||
else:
|
else:
|
||||||
self.print_raw("# " + output.rstrip().replace("\n", "\n# ") + "\n")
|
self.print_raw("# " + output.rstrip().replace("\n", "\n# ") + "\n")
|
||||||
|
# Truncate doesn't change the current stream position.
|
||||||
|
# Seek to the beginning to avoid extensions on subsequent writes.
|
||||||
|
log.seek(0)
|
||||||
log.truncate(0)
|
log.truncate(0)
|
||||||
|
|
||||||
def addSuccess(self, test):
|
def addSuccess(self, test):
|
||||||
|
Loading…
Reference in New Issue
Block a user