source: trunk/unit_tests.py

Last change on this file was 3166, checked in by toby, 4 years ago

Misc Py3 fixes

  • Property svn:eol-style set to native
  • Property svn:keywords set to Date Author Revision URL Id
File size: 1.0 KB
Line 
1########### SVN repository information ###################
2# $Date: 2017-11-30 04:38:49 +0000 (Thu, 30 Nov 2017) $
3# $Author: vondreele $
4# $Revision: 3166 $
5# $URL: trunk/unit_tests.py $
6# $Id: unit_tests.py 3166 2017-11-30 04:38:49Z vondreele $
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.