def test_debug_disable(): import osxphotos import logging osxphotos._set_debug(False) logger = osxphotos._get_logger() assert not logger.isEnabledFor(logging.DEBUG)
def test_debug_enable(): import osxphotos import logging osxphotos._set_debug(True) logger = osxphotos._get_logger() assert logger.isEnabledFor(logging.DEBUG)
def __init__(self, db=None, json=False, debug=False): if debug: osxphotos._set_debug(True) self.db = db self.json = json