From 8e7cc6b392d8b0135825a520c25a566137c0fdd2 Mon Sep 17 00:00:00 2001
From: Kipp Cannon <kipp.cannon@ligo.org>
Date: Fri, 1 Sep 2017 08:45:26 +0900
Subject: [PATCH] horizonhistory.py:  documentation fixes

- gets doctest working
---
 gstlal-inspiral/python/stats/horizonhistory.py | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/gstlal-inspiral/python/stats/horizonhistory.py b/gstlal-inspiral/python/stats/horizonhistory.py
index 8173d0281e..f481eb5ca3 100644
--- a/gstlal-inspiral/python/stats/horizonhistory.py
+++ b/gstlal-inspiral/python/stats/horizonhistory.py
@@ -110,7 +110,8 @@ class NearestLeafTree(object):
 	True
 	>>> 103 in x
 	False
-	>>> x.to_xml(u"H1").write()
+	>>> import sys
+	>>> x.to_xml(u"H1").write(sys.stdout)	# doctest: +NORMALIZE_WHITESPACE
 	<Array Type="real_8" Name="H1:nearestleaftree:array">
 		<Dim>2</Dim>
 		<Dim>2</Dim>
@@ -201,8 +202,9 @@ class NearestLeafTree(object):
 		>>> x = NearestLeafTree([(100., 0.), (150., 1.), (200., 0.)])
 		>>> del x[150.]
 		>>> x
-		NearestLeafTree([(100., 0.), (200., 0.)])
+		NearestLeafTree([(100, 0), (200, 0)])
 		>>> del x[:]
+		>>> x
 		NearestLeafTree([])
 		"""
 		if isinstance(x, slice):
-- 
GitLab