@@ -17,7 +17,7 @@ def f4(a1, a2, a3, data, k1, k2):
1717
1818def f5 (data ):
1919 # Make queue monitor timeout on main thread
20- time .sleep (1 .2 )
20+ time .sleep (0 .2 )
2121 raise RuntimeError
2222
2323def consumer (data ):
@@ -27,28 +27,28 @@ def consumer(data):
2727 return total
2828
2929def test_pipeline ():
30- p = task (f1 ) >> task (f2 )
30+ p = task (f1 ) | task (f2 )
3131 assert p (1 ).__next__ () == 1
3232
3333def test_joined_pipeline ():
34- p = task (f1 ) >> task (f2 ) >> task (f3 , join = True )
34+ p = task (f1 ) | task (f2 ) | task (f3 , join = True )
3535 assert p (1 ).__next__ () == 1
3636
3737def test_bind ():
38- p = task (f1 ) >> task (f4 , bind = task .bind (1 , 1 , 1 , k1 = 1 , k2 = 2 ))
38+ p = task (f1 ) | task (f4 , bind = task .bind (1 , 1 , 1 , k1 = 1 , k2 = 2 ))
3939 assert p (1 ).__next__ () == 1
4040
4141def test_redundant_bind_ok ():
42- p = task (f1 ) >> task (f2 , bind = task .bind ())
42+ p = task (f1 ) | task (f2 , bind = task .bind ())
4343 assert p (1 ).__next__ () == 1
4444
4545def test_consumer ():
46- p = task (f1 ) >> task (f2 ) & consumer
46+ p = task (f1 ) | task (f2 ) > consumer
4747 assert p (1 ) == 1
4848
4949def test_invalid_first_stage_concurrency ():
5050 try :
51- p = task (f1 , concurrency = 2 ) >> task (f2 ) & consumer
51+ p = task (f1 , concurrency = 2 ) | task (f2 ) > consumer
5252 p (1 )
5353 except Exception as e :
5454 assert isinstance (e , RuntimeError )
@@ -57,7 +57,7 @@ def test_invalid_first_stage_concurrency():
5757
5858def test_invalid_first_stage_join ():
5959 try :
60- p = task (f1 , join = True ) >> task (f2 ) & consumer
60+ p = task (f1 , join = True ) | task (f2 ) > consumer
6161 p (1 )
6262 except Exception as e :
6363 assert isinstance (e , RuntimeError )
@@ -66,7 +66,7 @@ def test_invalid_first_stage_join():
6666
6767def test_error_handling ():
6868 try :
69- p = task (f1 ) >> task (f2 ) >> task (f5 ) & consumer
69+ p = task (f1 ) | task (f2 ) | task (f5 ) > consumer
7070 p (1 )
7171 except Exception as e :
7272 print (e )
@@ -76,7 +76,7 @@ def test_error_handling():
7676
7777def test_error_handling_in_daemon ():
7878 try :
79- p = task (f5 , daemon = True ) >> task (f2 ) & consumer
79+ p = task (f5 , daemon = True ) | task (f2 ) > consumer
8080 p (1 )
8181 except Exception as e :
8282 print (e )
0 commit comments