diff options
| author | Robert Collins <robertc@robertcollins.net> | 2009-10-11 08:35:19 +1100 |
|---|---|---|
| committer | Robert Collins <robertc@robertcollins.net> | 2009-10-11 08:35:19 +1100 |
| commit | 31a6e9bb2dcce48fe6aabe1cf6cd6bc566820b2f (patch) | |
| tree | 12e47d0c19fb5e3a2acd6eaaf223e62670277ccf /python/subunit/__init__.py | |
| parent | 14ee0c9ccc1b3130a46938adaab9f5d629e9a2a7 (diff) | |
| download | subunit-git-31a6e9bb2dcce48fe6aabe1cf6cd6bc566820b2f.tar.gz | |
multipart details trigger the parser to detect interrupted streams too.
Diffstat (limited to 'python/subunit/__init__.py')
| -rw-r--r-- | python/subunit/__init__.py | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/python/subunit/__init__.py b/python/subunit/__init__.py index bc67921..c7edf6e 100644 --- a/python/subunit/__init__.py +++ b/python/subunit/__init__.py @@ -241,11 +241,11 @@ class _ParserState(object): class _InTest(_ParserState): """State for the subunit parser after reading a test: directive.""" - def _outcome(self, offset, line, no_details, simple_details_state): + def _outcome(self, offset, line, no_details, details_state): """An outcome directive has been read. :param no_details: Callable to call when no details are presented. - :param simple_details_state: The state to switch to for simple details + :param details_state: The state to switch to for details processing of this outcome. """ if self.parser.current_test_description == line[offset:-1]: @@ -255,7 +255,11 @@ class _InTest(_ParserState): self.parser.client.stopTest(self.parser._current_test) self.parser._current_test = None elif self.parser.current_test_description + " [" == line[offset:-1]: - self.parser._state = simple_details_state + self.parser._state = details_state + self.parser._message = "" + elif self.parser.current_test_description + " [ multipart" == \ + line[offset:-1]: + self.parser._state = details_state self.parser._message = "" else: self.parser.stdOutLineReceived(line) |
