test_al.py

来自「mallet是自然语言处理、机器学习领域的一个开源项目。」· Python 代码 · 共 24 行

PY
24
字号
#! /usr/bin/env python"""Whimpy test script for the al module   Roger E. Masse"""import alfrom test_support import verbosealattrs = ['__doc__', '__name__', 'getdefault', 'getminmax', 'getname', 'getparams',           'newconfig', 'openport', 'queryparams', 'setparams']# This is a very unobtrusive test for the existence of the al module and all it's# attributes.  More comprehensive examples can be found in Demo/aldef main():    # touch all the attributes of al without doing anything    if verbose:        print 'Touching al module attributes...'    for attr in alattrs:        if verbose:            print 'touching: ', attr        getattr(al, attr)main()

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?