File: hooks.test

package info (click to toggle)
atheist 0.20110402-2
  • links: PTS
  • area: main
  • in suites: jessie, jessie-kfreebsd, wheezy
  • size: 1,332 kB
  • ctags: 902
  • sloc: python: 4,764; xml: 626; makefile: 113; cpp: 54; ansic: 5; sh: 5
file content (16 lines) | stat: -rw-r--r-- 568 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
# -*- mode:python; coding:utf-8 -*-

import os
from atheist.const import ATHEIST_TMP_BASE

fname = os.path.join(ATHEIST_TMP_BASE, 'hook-log')

t1 = Test('touch ' + fname)
t1.gen += fname

t2 = Test('$atheist -vv -i2 $testdir/hooks/hello.mtest', save_stderr=True)
t2.post += FileContains(['_setup ran', 'test ran', '_teardown ran'], fname)
t2.post += FileContains(['Test-1  s( 0: 0)  echo "_setup ran"',
                         'Test-2  -( 0: 0)  echo "test ran"',
                         'Test-3  t( 0: 0)  echo "_teardown ran"'],
                        t2.stderr)