Skip to content

Commit 491829b

Browse files
committed
chore: remove duplicate test
1 parent 7e56b8a commit 491829b

File tree

1 file changed

+0
-31
lines changed

1 file changed

+0
-31
lines changed

Diff for: tests/functional/test_logger_utils.py

-31
Original file line numberDiff line numberDiff line change
@@ -195,37 +195,6 @@ def test_copy_config_to_ext_loggers_should_not_break_append_keys(stdout, log_lev
195195
powertools_logger.append_keys(key="value")
196196

197197

198-
def test_copy_child_config_to_ext_loggers_should_not_break_append_keys(stdout):
199-
# GIVEN powertools logger AND child initialized AND
200-
201-
# GIVEN Loggers are initialized
202-
# create child logger before parent to mimick
203-
# importing logger from another module/file
204-
# as loggers are created in global scope
205-
service = service_name()
206-
child = Logger(stream=stdout, service=service, child=True)
207-
parent = Logger(stream=stdout, service=service)
208-
209-
# WHEN a child Logger adds an additional key AND child logger adds additional key
210-
# AND configuration copied from powertools child logger
211-
# AND powertools logger and child logger used
212-
child.structure_logs(append=True, customer_id="value")
213-
parent.structure_logs(append=True, user_id="value")
214-
utils.copy_config_to_registered_loggers(source_logger=child)
215-
parent.warning("Logger message")
216-
child.warning("Child logger message")
217-
218-
# THEN both custom keys should be propagated bi-directionally in parent and child loggers
219-
# as parent logger won't be touched when config is being copied
220-
parent_log, child_log = capture_multiple_logging_statements_output(stdout)
221-
assert "customer_id" in parent_log
222-
assert "customer_id" in child_log
223-
assert "user_id" in parent_log
224-
assert "user_id" in child_log
225-
assert "Child Logger message" not in parent_log
226-
assert child.parent.name == service
227-
228-
229198
def test_copy_config_to_parent_loggers_only(stdout):
230199
# GIVEN Powertools Logger and Child Logger are initialized
231200
# and Powertools Logger config is copied over

0 commit comments

Comments
 (0)