示例#1
0
    def test_ordinal_arguments_level(self):
        logger, handler = create_logger(logging.WARNING)

        logger.warning("Arg1 = '%s', Arg2 = '%s', Arg3 = %d", "Foo", "Bar", 7)

        record = handler.pop_record()
        expect.log_level(record, logging.WARNING)
示例#2
0
    def test_named_arguments_level(self):
        record = self.create_test_log_record(
            logging.WARNING,
            "Arg1 = '{Argument1}', Arg2 = '{Argument2}', Arg3 = {Argument3}",
            Argument1="Foo",
            Argument2="Bar",
            Argument3=7)

        expect.log_level(record, logging.WARNING)
    def test_ordinal_arguments_level(self):
        record = self.create_test_log_record(
            logging.WARNING,
            "Arg1 = '%s', Arg2 = '%s', Arg3 = %d",
            "Foo",
            "Bar",
            7
        )

        expect.log_level(record, logging.WARNING)
示例#4
0
    def test_named_arguments_level(self):
        logger, handler = create_logger(logging.WARNING)

        logger.warning(
            "Arg1 = '{Argument1}', Arg2 = '{Argument2}', Arg3 = {Argument3}",
            Argument1="Foo",
            Argument2="Bar",
            Argument3=7)

        record = handler.pop_record()
        expect.log_level(record, logging.WARNING)