Skip to content

Commit

Permalink
Replace # with \x23 in test files.
Browse files Browse the repository at this point in the history
This works around a twistedchecker issue:

twisted/twistedchecker#110

Recommended during review.
  • Loading branch information
jlitzingerdev committed Jul 21, 2018
1 parent b704541 commit 5caf48c
Showing 1 changed file with 9 additions and 9 deletions.
18 changes: 9 additions & 9 deletions src/twisted/logger/test/test_format.py
Original file line number Diff line number Diff line change
Expand Up @@ -273,7 +273,7 @@ def test_formatTimeDefault(self):
event = dict(log_format=u"XYZZY", log_time=t)
self.assertEqual(
formatEventAsClassicLogText(event),
u"2013-09-24T11:40:47+0000 [-#-] XYZZY\n",
u"2013-09-24T11:40:47+0000 [-\x23-] XYZZY\n",
)


Expand All @@ -286,7 +286,7 @@ def test_formatTimeCustom(self):
event = dict(log_format=u"XYZZY", log_time=12345)
self.assertEqual(
formatEventAsClassicLogText(event, formatTime=formatTime),
u"__12345__ [-#-] XYZZY\n",
u"__12345__ [-\x23-] XYZZY\n",
)


Expand All @@ -297,7 +297,7 @@ def test_formatNamespace(self):
event = dict(log_format=u"XYZZY", log_namespace="my.namespace")
self.assertEqual(
formatEventAsClassicLogText(event),
u"- [my.namespace#-] XYZZY\n",
u"- [my.namespace\x23-] XYZZY\n",
)


Expand All @@ -308,7 +308,7 @@ def test_formatLevel(self):
event = dict(log_format=u"XYZZY", log_level=LogLevel.warn)
self.assertEqual(
formatEventAsClassicLogText(event),
u"- [-#warn] XYZZY\n",
u"- [-\x23warn] XYZZY\n",
)


Expand Down Expand Up @@ -357,7 +357,7 @@ def test_formatFormat(self):
event = dict(log_format=u"id:{id}", id="123")
self.assertEqual(
formatEventAsClassicLogText(event),
u"- [-#-] id:123\n",
u"- [-\x23-] id:123\n",
)


Expand Down Expand Up @@ -390,7 +390,7 @@ def test_formatFormatMultiLine(self):
event = dict(log_format=u'XYZZY\nA hollow voice says:\n"Plugh"')
self.assertEqual(
formatEventAsClassicLogText(event),
u'- [-#-] XYZZY\n\tA hollow voice says:\n\t"Plugh"\n',
u'- [-\x23-] XYZZY\n\tA hollow voice says:\n\t"Plugh"\n',
)


Expand Down Expand Up @@ -720,7 +720,7 @@ def test_eventAsTextSystemMissing(self):
)
self.assertEqual(
eventText,
u"[-#-] ABCD\n",
u"[-\x23-] ABCD\n",
)


Expand Down Expand Up @@ -750,7 +750,7 @@ def test_eventAsTextSystemMissingNamespaceAndLevel(self):
)
self.assertEqual(
eventText,
u"[test#info] ABCD\n",
u"[test\x23info] ABCD\n",
)


Expand Down Expand Up @@ -779,5 +779,5 @@ def test_eventAsTextSystemMissingLevelOnly(self):
)
self.assertEqual(
eventText,
u"[-#info] ABCD\n",
u"[-\x23info] ABCD\n",
)

0 comments on commit 5caf48c

Please sign in to comment.