diff options
-rw-r--r-- | tests/functional/l/logging_not_lazy_with_logger.py | 13 | ||||
-rw-r--r-- | tests/functional/l/logging_not_lazy_with_logger.txt | 4 | ||||
-rw-r--r-- | tests/input/func_logging_not_lazy_with_logger.py | 13 | ||||
-rw-r--r-- | tests/messages/func_logging_not_lazy_with_logger.txt | 4 | ||||
-rw-r--r-- | tests/test_func.py | 2 |
5 files changed, 18 insertions, 18 deletions
diff --git a/tests/functional/l/logging_not_lazy_with_logger.py b/tests/functional/l/logging_not_lazy_with_logger.py new file mode 100644 index 000000000..ef2221f23 --- /dev/null +++ b/tests/functional/l/logging_not_lazy_with_logger.py @@ -0,0 +1,13 @@ +"""Logging warnings using a logger class.""" +from __future__ import absolute_import +import logging + +__revision__ = '' + +LOG = logging.getLogger("domain") +LOG.debug("%s" % "junk") # [logging-not-lazy] +LOG.log(logging.DEBUG, "%s" % "junk") # [logging-not-lazy] +LOG2 = LOG.debug +LOG2("%s" % "junk") # [logging-not-lazy] + +logging.getLogger("domain").debug("%s" % "junk") # [logging-not-lazy] diff --git a/tests/functional/l/logging_not_lazy_with_logger.txt b/tests/functional/l/logging_not_lazy_with_logger.txt new file mode 100644 index 000000000..31fe45c6d --- /dev/null +++ b/tests/functional/l/logging_not_lazy_with_logger.txt @@ -0,0 +1,4 @@ +logging-not-lazy:8:0::Use lazy % formatting in logging functions +logging-not-lazy:9:0::Use lazy % formatting in logging functions +logging-not-lazy:11:0::Use lazy % formatting in logging functions +logging-not-lazy:13:0::Use lazy % formatting in logging functions diff --git a/tests/input/func_logging_not_lazy_with_logger.py b/tests/input/func_logging_not_lazy_with_logger.py deleted file mode 100644 index 973a5c795..000000000 --- a/tests/input/func_logging_not_lazy_with_logger.py +++ /dev/null @@ -1,13 +0,0 @@ -"""Logging warnings using a logger class.""" -from __future__ import absolute_import -import logging - -__revision__ = '' - -LOG = logging.getLogger("domain") -LOG.debug("%s" % "junk") -LOG.log(logging.DEBUG, "%s" % "junk") -LOG2 = LOG.debug -LOG2("%s" % "junk") - -logging.getLogger("domain").debug("%s" % "junk") diff --git a/tests/messages/func_logging_not_lazy_with_logger.txt b/tests/messages/func_logging_not_lazy_with_logger.txt deleted file mode 100644 index 22e7bc6af..000000000 --- a/tests/messages/func_logging_not_lazy_with_logger.txt +++ /dev/null @@ -1,4 +0,0 @@ -W: 8: Use lazy % formatting in logging functions -W: 9: Use lazy % formatting in logging functions -W: 11: Use lazy % formatting in logging functions -W: 13: Use lazy % formatting in logging functions diff --git a/tests/test_func.py b/tests/test_func.py index 6b4464fa4..6cc5dbd87 100644 --- a/tests/test_func.py +++ b/tests/test_func.py @@ -120,7 +120,7 @@ def gen_tests(filter_rgx): tests.append((module_file, messages_file, dependencies)) if UPDATE_FILE.exists(): return tests - assert len(tests) < 53, "Please do not add new test cases here." + assert len(tests) < 49, "Please do not add new test cases here." return tests |