File: list-only.test

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

import os

def test_files():
    return [x for x in os.listdir('$testdir') if x.endswith('.test')]

t = Test('$atheist -l $testdir', timeout=10)
for f in sorted(test_files()):
    if os.path.exists(os.path.join('$testdir', f)):
        t.post += FileContains(f)
    else:
        t.post += Not(FileContains(f))