[conduit: 132/138] Infrastructure for collecting additional test data



commit ae847307965bd152e482ca0f053b81124be531e8
Author: John Carr <john carr unrouted co uk>
Date:   Thu May 7 02:40:03 2009 -0700

    Infrastructure for collecting additional test data
---
 test/soup/utils/test.py |    5 +++++
 1 files changed, 5 insertions(+), 0 deletions(-)

diff --git a/test/soup/utils/test.py b/test/soup/utils/test.py
index 98d09ea..033fcbd 100644
--- a/test/soup/utils/test.py
+++ b/test/soup/utils/test.py
@@ -265,11 +265,16 @@ class TestResult(unittest.TestResult):
         self.verbosity = verbosity
         self.num_tests = num_tests
         self.unsupported = {}
+        self.attachments = {}
 
     def startTest(self, test):
         super(TestResult, self).startTest(test)
         self.report_test_start(test)
 
+    def addAttachment(self, test, name, attachment):
+        self.attachments.setdefault(test, [])
+        self.attachments[test].append((name, attachment))
+
     def stopTest(self, test):
         super(TestResult, self).stopTest(test)
         self.report_test_stop(test)



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]