Ejemplo n.º 1
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
Ejemplo n.º 2
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
Ejemplo n.º 3
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
Ejemplo n.º 4
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
Ejemplo n.º 5
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
Ejemplo n.º 6
0
#!/usr/bin/env python3

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

plan(tests=2)
ok("Proving it right")
not_ok("and failing")

out()

##     validity: -1
## ok testcases: 1 / 2
##      bailout: no
##       stderr: failing
Ejemplo n.º 7
0
#!/usr/bin/env python3

from taptaptap3.proc import plan, not_ok, out

plan(tests=1, tapversion=12, skip="environment does not fit")
not_ok("TypeError")

out()

##     validity: 0
## ok testcases: 0 / 1
##      bailout: no
##       stderr: TypeError
##       stderr: TAP version 12
##       stderr: environment does