source: trunk/unit_tests.py @ 939

Last change on this file since 939 was 939, checked in by toby, 8 years ago

fix & cleanup unit tests; add/change doc strings for sphinx; add all G2 py files to sphinx

  • Property svn:eol-style set to native
File size: 1.0 KB
Line 
1########### SVN repository information ###################
2# $Date$
3# $Author$
4# $Revision$
5# $URL$
6# $Id$
7########### SVN repository information ###################
8'''
9*unit_tests: Self-test Module*
10------------------------------
11
12A script that can be run to test a series of self-tests in GSAS-II. At present,
13only modules ``GSASIIspc`` and ``GSASIIlattice`` have self-tests.
14
15'''
16
17import GSASIIspc
18import GSASIIlattice
19def test_GSASIIspc():
20    '''Test registered self-tests in ``GSASIIspc``.
21    Takes no input and returns nothing. Throws an Exception if a test fails.
22    '''
23    #GSASIIspc.selftestquiet = False
24    for test in GSASIIspc.selftestlist:
25        test()
26def test_GSASIIlattice():
27    '''Test registered self-tests in ``GSASIIlattice``.
28    Takes no input and returns nothing. Throws an Exception if a test fails.
29    '''
30    #GSASIIlattice.selftestquiet = False
31    for test in GSASIIlattice.selftestlist:
32        test()
33
34if __name__ == '__main__':
35    test_GSASIIspc()
36    test_GSASIIlattice()
37    print "OK"
Note: See TracBrowser for help on using the repository browser.