File: get_task.test

package info (click to toggle)
atheist 0.20100717-1
  • links: PTS
  • area: main
  • in suites: squeeze
  • size: 900 kB
  • ctags: 558
  • sloc: python: 2,922; xml: 578; makefile: 111; sh: 5
file content (11 lines) | stat: -rw-r--r-- 236 bytes parent folder | download | duplicates (4)
1
2
3
4
5
6
7
8
9
10
11
# -*- mode: python; coding: utf-8 -*-

d0 = Daemon("cat", tid='cat')

def same_task(a, b):
    return 0 if a is b else 1

t = TestFunc(same_task, (d0, get_task('cat')),
             desc="Task equality")
t.pre += Poll(TaskRunning(d0))