forked from DonJayamanne/pythonVSCode
-
Notifications
You must be signed in to change notification settings - Fork 1.2k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
switch testing output to test result panel (#22039)
closes #21861 and related issues --------- Co-authored-by: Courtney Webster <[email protected]>
- Loading branch information
1 parent
055a352
commit 1dd8a4b
Showing
14 changed files
with
298 additions
and
83 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
# Copyright (c) Microsoft Corporation. All rights reserved. | ||
# Licensed under the MIT License. | ||
import logging | ||
import sys | ||
|
||
|
||
def test_logging2(caplog): | ||
logger = logging.getLogger(__name__) | ||
caplog.set_level(logging.DEBUG) # Set minimum log level to capture | ||
|
||
logger.debug("This is a debug message.") | ||
logger.info("This is an info message.") | ||
logger.warning("This is a warning message.") | ||
logger.error("This is an error message.") | ||
logger.critical("This is a critical message.") | ||
|
||
# Printing to stdout and stderr | ||
print("This is a stdout message.") | ||
print("This is a stderr message.", file=sys.stderr) | ||
assert False | ||
|
||
|
||
def test_logging(caplog): | ||
logger = logging.getLogger(__name__) | ||
caplog.set_level(logging.DEBUG) # Set minimum log level to capture | ||
|
||
logger.debug("This is a debug message.") | ||
logger.info("This is an info message.") | ||
logger.warning("This is a warning message.") | ||
logger.error("This is an error message.") | ||
logger.critical("This is a critical message.") | ||
|
||
# Printing to stdout and stderr | ||
print("This is a stdout message.") | ||
print("This is a stderr message.", file=sys.stderr) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.