summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPierre Sassoulas <pierre.sassoulas@gmail.com>2021-03-07 21:38:33 +0100
committerPierre Sassoulas <pierre.sassoulas@gmail.com>2021-03-07 22:59:36 +0100
commite1a7f0afa8f8a55587b99eb6a3fde7d0510e6b49 (patch)
tree94ce76bd53e757922eaf60e574158b78120bcf0a
parenta8fea87b9bc8c2a3e4a4ba5f13b94c1857726c67 (diff)
downloadpylint-git-e1a7f0afa8f8a55587b99eb6a3fde7d0510e6b49.tar.gz
Migrate func_logging_not_lazy_with_logger to new functional tests
-rw-r--r--tests/functional/l/logging_not_lazy_with_logger.py13
-rw-r--r--tests/functional/l/logging_not_lazy_with_logger.txt4
-rw-r--r--tests/input/func_logging_not_lazy_with_logger.py13
-rw-r--r--tests/messages/func_logging_not_lazy_with_logger.txt4
-rw-r--r--tests/test_func.py2
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