PageRenderTime 474ms CodeModel.GetById 212ms app.highlight 2ms RepoModel.GetById 139ms app.codeStats 0ms

/Lib/test/test_al.py

http://unladen-swallow.googlecode.com/
Python | 25 lines | 13 code | 5 blank | 7 comment | 5 complexity | d864c280cbd47a339502cc257019d892 MD5 | raw file
 1#! /usr/bin/env python
 2"""Whimpy test script for the al module
 3   Roger E. Masse
 4"""
 5from test.test_support import verbose, import_module
 6al = import_module('al', deprecated=True)
 7
 8alattrs = ['__doc__', '__name__', 'getdefault', 'getminmax', 'getname', 'getparams',
 9           'newconfig', 'openport', 'queryparams', 'setparams']
10
11# This is a very unobtrusive test for the existence of the al module and all its
12# attributes.  More comprehensive examples can be found in Demo/al
13
14def test_main():
15    # touch all the attributes of al without doing anything
16    if verbose:
17        print 'Touching al module attributes...'
18    for attr in alattrs:
19        if verbose:
20            print 'touching: ', attr
21        getattr(al, attr)
22
23
24if __name__ == '__main__':
25    test_main()