From 1998f2f65557ba9a210e235b143afd529cedb3be Mon Sep 17 00:00:00 2001
From: gpotter2 <gabriel@potter.fr>
Date: Mon, 8 May 2017 23:24:12 +0200
Subject: [PATCH] More pipetool tests

---
 test/pipetool.uts | 46 ++++++++++++++++++++++++++++++++++++++++++++++
 1 file changed, 46 insertions(+)

diff --git a/test/pipetool.uts b/test/pipetool.uts
index f063e8ff..2d977237 100644
--- a/test/pipetool.uts
+++ b/test/pipetool.uts
@@ -19,3 +19,49 @@ p.graph(type="png",target="> /tmp/pipe.png")
 p.start()
 time.sleep(3)
 p.stop()
+
+= Test add_pipe
+
+s = AutoSource()
+p = PipeEngine(s)
+p.add(Pipe())
+assert len(p.active_pipes) == 2
+
+x = p.spawn_Pipe()
+assert len(p.active_pipes) == 3
+assert isinstance(x, Pipe)
+
+= Test Operators
+
+s = AutoSource()
+p = PipeEngine(s)
+assert p == p
+assert not p < p
+assert not p > p
+
+a = AutoSource()
+b = AutoSource()
+a >> b
+assert len(a.high_sinks) == 1
+assert len(a.high_sources) == 0
+assert len(b.high_sinks) == 0
+assert len(b.high_sources) == 1
+a
+b
+
+a = AutoSource()
+b = AutoSource()
+a << b
+assert len(a.high_sinks) == 0
+assert len(a.high_sources) == 1
+assert len(b.high_sinks) == 1
+assert len(b.high_sources) == 0
+a
+b
+
+= Test doc
+
+s = AutoSource()
+p = PipeEngine(s)
+p.list_pipes()
+p.list_pipes_detailed()
-- 
GitLab