summaryrefslogtreecommitdiffstats
path: root/Lib/test
diff options
context:
space:
mode:
authorVinay Sajip <vinay_sajip@yahoo.co.uk>2013-03-29 17:56:54 (GMT)
committerVinay Sajip <vinay_sajip@yahoo.co.uk>2013-03-29 17:56:54 (GMT)
commit28421c6f6264ed33aea31a161ebd77f935437d3f (patch)
tree8e42fd8320c087eeffa46953975d0bea02cdc8cd /Lib/test
parent6d2bc6e80b53658bd249480c3e1172b7546caea1 (diff)
downloadcpython-28421c6f6264ed33aea31a161ebd77f935437d3f.zip
cpython-28421c6f6264ed33aea31a161ebd77f935437d3f.tar.gz
cpython-28421c6f6264ed33aea31a161ebd77f935437d3f.tar.bz2
Issue #17540: Added style to Formatter configuration by dict.
Diffstat (limited to 'Lib/test')
-rw-r--r--Lib/test/test_logging.py5
1 files changed, 4 insertions, 1 deletions
diff --git a/Lib/test/test_logging.py b/Lib/test/test_logging.py
index 2ff8c91..c9a051a 100644
--- a/Lib/test/test_logging.py
+++ b/Lib/test/test_logging.py
@@ -2398,7 +2398,8 @@ class ConfigDictTest(BaseTest):
"version": 1,
"formatters": {
"mySimpleFormatter": {
- "format": "%(asctime)s (%(name)s) %(levelname)s: %(message)s"
+ "format": "%(asctime)s (%(name)s) %(levelname)s: %(message)s",
+ "style": "$"
}
},
"handlers": {
@@ -2728,6 +2729,8 @@ class ConfigDictTest(BaseTest):
self.apply_config(self.out_of_order)
handler = logging.getLogger('mymodule').handlers[0]
self.assertIsInstance(handler.target, logging.Handler)
+ self.assertIsInstance(handler.formatter._style,
+ logging.StringTemplateStyle)
def test_baseconfig(self):
d = {