def run(self, *args, **kwargs): with environment_append({"CONAN_LOGGING_LEVEL": None}): super(ClientConfLogTest, self).run(*args, **kwargs)
def test_log_level_numbers_env_var_debug(self): with environment_append({"CONAN_LOGGING_LEVEL": "10"}): save(os.path.join(self.tmp_dir, CONAN_CONF), default_client_conf) config = ConanClientConfigParser( os.path.join(self.tmp_dir, CONAN_CONF)) self.assertEqual(logging.DEBUG, config.logging_level)
def test_log_level_names_env_var_invalid(self): with environment_append({"CONAN_LOGGING_LEVEL": "WakaWaka"}): save(os.path.join(self.tmp_dir, CONAN_CONF), default_client_conf) config = ConanClientConfigParser( os.path.join(self.tmp_dir, CONAN_CONF)) self.assertEqual(logging.CRITICAL, config.logging_level)