Allow headless tests

This commit is contained in:
Guillaume Valadon 2018-01-28 14:10:08 +01:00
parent db3da74e07
commit 0daa072844
1 changed files with 6 additions and 2 deletions

View File

@ -10,9 +10,13 @@ s = PeriodicSource("hello", 1, name="src")
d1 = Drain(name="d1")
c = ConsoleSink(name="c")
tf = TransformDrain(lambda x: "Got %s" % x)
t = TermSink(name="PipeToolsPeriodicTest", keepterm=False)
s > d1 > c
d1 > tf > t
d1 > tf
try:
t = TermSink(name="PipeToolsPeriodicTest", keepterm=False)
tf > t
except FileNotFoundError:
pass
p = PipeEngine(s)
p.start()