From d46ea03871562d4c93a9dfedcb211051338b44a9 Mon Sep 17 00:00:00 2001 From: kshitij12345 Date: Sun, 12 Sep 2021 17:05:33 -0700 Subject: [PATCH] [fix] fix test_python_dispatch with pytest (#64574) Summary: Fixes https://github.com/pytorch/pytorch/issues/62501 Another approach for fixing the same issue Pull Request resolved: https://github.com/pytorch/pytorch/pull/64574 Reviewed By: ngimel Differential Revision: D30867237 Pulled By: ezyang fbshipit-source-id: c632a1e0b241effdc21ae929abe42fccec88aa24 --- test/test_python_dispatch.py | 1 + 1 file changed, 1 insertion(+) diff --git a/test/test_python_dispatch.py b/test/test_python_dispatch.py index cd09488..218c68f 100644 --- a/test/test_python_dispatch.py +++ b/test/test_python_dispatch.py @@ -95,6 +95,7 @@ def capture_logs() -> Iterator[List[str]]: handler = LoggingTensorHandler(log_list) logger.addHandler(handler) logger.setLevel(logging.INFO) + logger.propagate = False try: yield log_list finally: -- 2.7.4