Skip to content

Commit 77a0087

Browse files
committed
Python: add tests for loggers
1 parent 5ddfe75 commit 77a0087

File tree

1 file changed

+9
-0
lines changed
  • python/ql/test/library-tests/frameworks/stdlib

1 file changed

+9
-0
lines changed

python/ql/test/library-tests/frameworks/stdlib/Logging.py

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -43,3 +43,12 @@ class MyLogger(logging.Logger):
4343
pass
4444

4545
MyLogger("bar").info("hello") # $ loggingInput="hello"
46+
47+
class CustomLogger(logging.getLoggerClass()):
48+
pass
49+
50+
CustomLogger("baz").info("hello") # $ loggingInput="hello"
51+
52+
class LoggerSubClassUsingSelf(logging.Logger):
53+
def foo(self):
54+
self.info("hello") # $ loggingInput="hello"

0 commit comments

Comments
 (0)