summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJonathan Lange <jml@mumak.net>2015-11-02 20:01:30 +0000
committerJonathan Lange <jml@mumak.net>2015-11-09 13:24:01 +0000
commit528d86c2e4ca4653b9239b3f006a210e554583a7 (patch)
tree15d274b631b60847ec8c2588f0a51698b7b1776c
parent291e02cd09db3afe2860c01a35699f2463dd8f46 (diff)
downloadtesttools-528d86c2e4ca4653b9239b3f006a210e554583a7.tar.gz
Remove temporary variable 'case'
-rw-r--r--testtools/testresult/real.py15
1 files changed, 7 insertions, 8 deletions
diff --git a/testtools/testresult/real.py b/testtools/testresult/real.py
index e2963ae..f82667a 100644
--- a/testtools/testresult/real.py
+++ b/testtools/testresult/real.py
@@ -766,20 +766,19 @@ class StreamToDict(StreamResult):
test_tags=test_tags, runnable=runnable, file_name=file_name,
file_bytes=file_bytes, eof=eof, mime_type=mime_type,
route_code=route_code, timestamp=timestamp)
+
key = self._ensure_key(test_id, route_code, timestamp)
- # update fields
if not key:
return
- case = self._inprogress[key]
+
+ # update fields
self._inprogress[key] = self._update_case(
- case, test_status, test_tags, file_name, file_bytes,
- mime_type, timestamp)
+ self._inprogress[key], test_status, test_tags, file_name,
+ file_bytes, mime_type, timestamp)
+
# notify completed tests.
if test_status not in INTERIM_STATES:
- # XXX: This isn't actually desirable end-state code, but I just
- # want to verify that we are re-using this correctly.
- case = self._inprogress.pop(key)
- self.on_test(case.to_dict())
+ self.on_test(self._inprogress.pop(key).to_dict())
def _update_case(self, case, test_status=None, test_tags=None,
file_name=None, file_bytes=None, mime_type=None,