diff options
| author | Robert Collins <robertc@robertcollins.net> | 2011-04-25 11:09:54 +1200 |
|---|---|---|
| committer | Robert Collins <robertc@robertcollins.net> | 2011-04-25 11:09:54 +1200 |
| commit | 86cff2f184f6bbd34fd330bae739a29a34a78d2a (patch) | |
| tree | f12e16329989ee0ea9e20b2e49e20f1f46516d74 /python/subunit/details.py | |
| parent | b21965301c3ab72e5e19848d1019ca2d8e83da50 (diff) | |
| download | subunit-git-86cff2f184f6bbd34fd330bae739a29a34a78d2a.tar.gz | |
Progress.
Diffstat (limited to 'python/subunit/details.py')
| -rw-r--r-- | python/subunit/details.py | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/python/subunit/details.py b/python/subunit/details.py index 36c9974..9790543 100644 --- a/python/subunit/details.py +++ b/python/subunit/details.py @@ -17,10 +17,13 @@ """Handlers for outcome details.""" from testtools import content, content_type -from testtools.compat import StringIO +from testtools.compat import _b, StringIO from subunit import chunked +end_marker = _b("]\n") +quoted_marker = _b(" ]") + class DetailsParser(object): """Base class/API reference for details parsing.""" @@ -30,14 +33,14 @@ class SimpleDetailsParser(DetailsParser): """Parser for single-part [] delimited details.""" def __init__(self, state): - self._message = "" + self._message = _b("") self._state = state def lineReceived(self, line): - if line == "]\n": + if line == end_marker: self._state.endDetails() return - if line[0:2] == " ]": + if line[0:2] == quoted_marker: # quoted ] start self._message += line[1:] else: |
