Debian Codegraph @

tests/_support/autoprint.py

raw
1 from invoke.tasks import task
2 from invoke.collection import Collection
3
4
5 @task
6 def nope(c):
7 return "You can't see this"
8
9
10 @task(autoprint=True)
11 def yup(c):
12 return "It's alive!"
13
14
15 @task(pre=[yup])
16 def pre_check(c):
17 pass
18
19
20 @task(post=[yup])
21 def post_check(c):
22 pass
23
24
25 sub = Collection("sub", yup)
26 ns = Collection(nope, yup, pre_check, post_check, sub)