def test_start_logger(): # remove all Handlers logger.start_logger() assert isinstance(logger.get_console_handler(), logging.Handler) assert isinstance(logger.get_file_handler(), logging.Handler) console_level = logger.get_level_code(qc.config.logger.console_level) file_level = logger.get_level_code(qc.config.logger.file_level) assert logger.get_console_handler().level == console_level assert logger.get_file_handler().level == file_level assert logging.getLogger().level == logger.get_level_code('DEBUG')
from keysight_fpga.sd1.dig_iq import load_iq_image from keysight_fpga.qcodes.M3202A_fpga import M3202A_fpga from core_tools.drivers.M3102A import SD_DIG, MODES from core_tools.HVI2.hvi2_schedule_loader import Hvi2ScheduleLoader from core_tools.HVI2.hvi2_video_mode import Hvi2VideoMode from pulse_lib.base_pulse import pulselib import qcodes import qcodes.logger as logger from qcodes.logger import start_all_logging start_all_logging() logger.get_file_handler().setLevel(logging.DEBUG) # close objects still active since previous run (IPython) try: oldLoader.close_all() except: pass oldLoader = Hvi2ScheduleLoader try: qcodes.Instrument.close_all() except: pass def create_pulse_lib(awgs):