@@ -6,10 +6,10 @@ class TestPipeline(unittest.TestCase):
6
6
7
7
def test_it_runs_a_pipeline_with_one_callable (self ):
8
8
pipeline = Pipeline ()
9
- result = pipeline .send ('hello ' ) \
9
+ result = pipeline .send ('hello world ' ) \
10
10
.through ([str .strip ]) \
11
11
.then_return ()
12
- self .assertEqual ('hello' , result )
12
+ self .assertEqual ('hello world ' , result )
13
13
14
14
def test_it_runs_a_pipeline_with_callables (self ):
15
15
pipeline = Pipeline ()
@@ -93,20 +93,20 @@ def execute(self, passable, next_pipe):
93
93
def test_it_runs_a_pipeline_by_sending_late (self ):
94
94
pipeline = Pipeline ()
95
95
pipeline .through ([str .title , str .strip ])
96
- result = pipeline .send ('hello ' ) \
96
+ result = pipeline .send ('hello world ' ) \
97
97
.then_return ()
98
- self .assertEqual ('Hello' , result )
98
+ self .assertEqual ('Hello World ' , result )
99
99
100
100
def test_it_runs_a_pipeline_setup_via_pipe (self ):
101
101
pipeline = Pipeline ()
102
102
pipeline .pipe ([str .title , str .strip ])
103
- result = pipeline .send ('hello ' ) \
103
+ result = pipeline .send ('hello world ' ) \
104
104
.then_return ()
105
- self .assertEqual ('Hello' , result )
105
+ self .assertEqual ('Hello World ' , result )
106
106
107
107
def test_it_bails_early (self ):
108
108
pipeline = Pipeline ()
109
- result = pipeline .send ('bork ' ) \
109
+ result = pipeline .send ('hellow world ' ) \
110
110
.through ([
111
111
lambda x , next_pipe : False ,
112
112
str .strip
@@ -116,14 +116,14 @@ def test_it_bails_early(self):
116
116
117
117
def test_it_bails_in_the_middle (self ):
118
118
pipeline = Pipeline ()
119
- result = pipeline .send ('bork ' ) \
119
+ result = pipeline .send ('hello world ' ) \
120
120
.through ([
121
121
str .strip ,
122
122
lambda x , next_pipe : x ,
123
123
str .title
124
124
]) \
125
125
.then ()
126
- self .assertEqual ('bork ' , result )
126
+ self .assertEqual ('hello world ' , result )
127
127
128
128
if __name__ == '__main__' :
129
129
unittest .main ()
0 commit comments