def main(): import taurus.qt.qtgui.application Application = taurus.qt.qtgui.application.TaurusApplication app = Application.instance() owns_app = app is None if owns_app: app = Application(app_name="Logging demo", app_version="1.0", org_domain="Taurus", org_name="Taurus community") taurus.setLogLevel(taurus.Trace) taurus.disableLogOutput() w = QLoggingWidget() taurus.trace("trace message") taurus.debug("debug message") taurus.info("Hello world") taurus.warning("Warning message") taurus.error("error message") taurus.critical("critical message") w.setMinimumSize(1200, 600) w.show() app.exec_() w.stop_logging()
def run(disableLogger=True, exclude_pattern='(?!)'): """Runs tests for the taurus package""" # disable logging messages if disableLogger: taurus.disableLogOutput() # discover tests within the taurus/lib directory suite = get_taurus_suite(exclude_pattern=exclude_pattern) # use the basic text test runner that outputs to sys.stderr runner = unittest.TextTestRunner(descriptions=True, verbosity=2) # run the test suite return runner.run(suite)
def run(disableLogger=True): """Runs all tests for the taurus package""" # disable logging messages if disableLogger: taurus.disableLogOutput() # discover all tests within the taurus/lib directory loader = unittest.defaultTestLoader suite = loader.discover(os.path.dirname(taurus.__file__)) # use the basic text test runner that outputs to sys.stderr runner = unittest.TextTestRunner(descriptions=True, verbosity=2) # run the test suite return runner.run(suite)