Exemple #1
0
#!/usr/bin/env python3

from taptaptap3.proc import plan, ok, not_ok, out

plan(first=1, last=13)
ok("Starting the program")
ok("Starting the engine")
ok("Find the object")
ok("Grab it", todo=True)
ok("Use it", todo=True)

2 * 2 == 4 and ok("2 * 2 == 4") or not_ok("2 * 2 != 4")

out()

##     validity: -1
## ok testcases: 6 / 13
##      bailout: no
##       stderr: 2 * 2 == 4
##       stderr: TODO
##       stderr: ~TRUE
##       stderr: ~True
##       stderr: ~true
Exemple #2
0
#!/usr/bin/env python3

from taptaptap3.proc import plan, ok, out

plan(first=1, last=3)
ok("Starting the program")
ok("Starting the engine")
ok("Find the object")

out()


##     validity: 0
## ok testcases: 3 / 3
##      bailout: no
##       stderr: program
Exemple #3
0
#!/usr/bin/env python3

from taptaptap3.proc import plan, ok, out

plan(tests=10)
ok("Starting the program")
ok("Starting the engine")
ok("Find the object")
ok("Transport object to target")
ok("Check for existing fire")
ok("Place it beneath the desk")
ok("Search for fire extinguisher")
ok("Extinguish fire")
ok("Put fire extinguisher back")
ok("Terminate")

out()

##     validity: 0
## ok testcases: 10 / 10
##      bailout: no
##       stderr: Find the object
Exemple #4
0
#!/usr/bin/env python3

from taptaptap3.proc import plan, ok, out, bailout

plan(first=1, last=2)
ok("before")
bailout("now")
ok("after")

out()

##     validity: -2
## ok testcases: 2 / 2
##      bailout: yes
##       stderr: before
##       stderr: Bail out! now
##       stderr: after
Exemple #5
0
#!/usr/bin/env python3

from taptaptap3.proc import plan, ok, not_ok, write, out

plan(first=1, last=1, tapversion=13)
2 * 2 == 4 and ok("2 * 2 == 4") or not_ok("2 * 2 != 4")
write("arithmetics checked")

out()

##     validity: 0
## ok testcases: 1 / 1
##      bailout: no
##       stderr: 2 * 2 == 4
##       stderr: TAP version 13
##       stderr: arithmetics checked
Exemple #6
0
#!/usr/bin/env python3

from taptaptap3.proc import plan, ok, out

plan(tests=1)
ok("Proving it right")

out()

##     validity: 0
## ok testcases: 1 / 1
##      bailout: no
##       stderr: Proving
Exemple #7
0
#!/usr/bin/env python3

from taptaptap3.proc import plan, ok, out

plan(tests=10)
ok("Starting the program")
ok("Starting the engine")
ok("Find the object", skip="Setup required")
ok("Terminate", skip="Setup missing")

out()

##     validity: -1
## ok testcases: 4 / 10
##      bailout: no
##       stderr: program
##       stderr: engine
##       stderr: object
##       stderr: Terminate
##       stderr: SKIP
##       stderr: Setup required
##       stderr: Setup missing
Exemple #8
0
#!/usr/bin/env python3

from taptaptap3.proc import plan, ok, not_ok, out

plan(tests=10)
ok("Starting the program")
not_ok("Starting the engine")
not_ok("Find the object")
not_ok("Terminate")

out()

##     validity: -1
## ok testcases: 1 / 10
##      bailout: no
##       stderr: program
##       stderr: engine
##       stderr: object
##       stderr: Terminate