File tree Expand file tree Collapse file tree 1 file changed +15
-1
lines changed
src/PyMca5/PyMcaGui/pymca Expand file tree Collapse file tree 1 file changed +15
-1
lines changed Original file line number Diff line number Diff line change 4949 'nativefiledialogs=' ,
5050 'PySide=' ,
5151 'binding=' ,
52- 'logging=' ]
52+ 'logging=' ,
53+ 'test' ]
5354 try :
5455 opts , args = getopt .getopt (
5556 sys .argv [1 :],
99100 import PyQt6 .QtCore
100101 else :
101102 raise ValueError ("Unknown Qt binding <%s>" % binding )
103+ elif opt in ('--test' ):
104+ try :
105+ from PyMca5 .tests import TestAll
106+ print ("Running PyMca Unit Tests..." )
107+ result = TestAll .main ()
108+ exit_code = 0 if result .wasSuccessful () else 1
109+ print ('exit code: ' , exit_code )
110+ sys .exit (exit_code )
111+ except Exception as e :
112+ import traceback
113+ print ("Failed to run tests:" , e )
114+ traceback .print_exc ()
115+ sys .exit (1 )
102116
103117 from PyMca5 .PyMcaCore .LoggingLevel import getLoggingLevel
104118 logging .basicConfig (level = getLoggingLevel (opts ))
You can’t perform that action at this time.
0 commit comments