Rev 5810: Add copyright notice, some docs and some cleanups. in file:///home/vila/src/bzr/experimental/config/
Vincent Ladeuil
v.ladeuil+lp at free.fr
Thu Jun 16 10:45:17 UTC 2011
At file:///home/vila/src/bzr/experimental/config/
------------------------------------------------------------
revno: 5810
revision-id: v.ladeuil+lp at free.fr-20110616104517-4qzhmzkxgozji88y
parent: v.ladeuil+lp at free.fr-20110616103851-c6n748igl9ibz2ls
committer: Vincent Ladeuil <v.ladeuil+lp at free.fr>
branch nick: selftest-config-stats
timestamp: Thu 2011-06-16 12:45:17 +0200
message:
Add copyright notice, some docs and some cleanups.
-------------- next part --------------
=== modified file 'tools/subunit-sum'
--- a/tools/subunit-sum 2011-06-16 10:38:51 +0000
+++ b/tools/subunit-sum 2011-06-16 10:45:17 +0000
@@ -1,13 +1,30 @@
#!/usr/bin/env python
-
-"""Displays the sum of a counter in a subunit stream."""
-
-from optparse import OptionParser
+# Copyright (C) 2011 Canonical Ltd
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+
+"""Displays the sum of a counter found in a subunit stream.
+
+Each test have (or not) the counter as a named detail in the stream.
+"""
+
+import subunit
import sys
import testtools
import unittest
-from subunit import DiscardStream, ProtocolTestCase
class TestSumCounter(testtools.TestResult):
@@ -39,6 +56,6 @@
counter_names = sys.argv[1:]
result = TestSumCounter(counter_names)
-test = ProtocolTestCase(sys.stdin)
+test = subunit.ProtocolTestCase(sys.stdin)
test.run(result)
result.display_totals(sys.stdout)
More information about the bazaar-commits
mailing list