subunit: Update to newer upstream snapshot.
authorJelmer Vernooij <jelmer@samba.org>
Thu, 9 Dec 2010 13:51:51 +0000 (14:51 +0100)
committerJelmer Vernooij <jelmer@samba.org>
Fri, 10 Dec 2010 02:04:06 +0000 (03:04 +0100)
lib/subunit/INSTALL
lib/subunit/NEWS
lib/subunit/python/subunit/__init__.py
lib/subunit/python/subunit/run.py
lib/subunit/setup.py
lib/subunit/shell/README
lib/subunit/shell/tests/test_function_output.sh
lib/subunit/shell/tests/test_source_library.sh

index 79cf7c18d008394407a7b31e2195b8b44ec94d8e..06122552eda893b7fe3ec22e2c7a005a393d586e 100644 (file)
@@ -14,7 +14,7 @@ Dependencies
 * Python for the filters
 * 'testtools' (On Debian and Ubuntu systems the 'python-testtools' package,
   the testtools package on pypi, or https://launchpad.net/testtools) for
-  the extended test API which permits attachments. Version 0.9.2 or newer is 
+  the extended test API which permits attachments. Version 0.9.8 or newer is 
   required. Of particular note, http://testtools.python-hosting.com/ is not
   the testtools you want.
 * A C compiler for the C bindings
@@ -23,3 +23,10 @@ Dependencies
 * python-gtk2 if you wish to use subunit2gtk
 * python-junitxml if you wish to use subunit2junitxml
 * pkg-config for configure detection of supporting libraries.
+
+Binary packages
+---------------
+
+A number of distributions now include subunit, you can try via your package
+manager. The authors maintain a personal package archive on Launchpad::
+  https://launchpad.net/~testing-cabal/+archive/archive
index 1af8ef57081202d9cc27570d17edf757a1c62d1a..f1fd9ce06fbdadc04c7fda7b64d3f5cf4e6e66bd 100644 (file)
@@ -5,6 +5,19 @@ subunit release notes
 NEXT (In development)
 ---------------------
 
+The Subunit Python test runner ``python -m subunit.run`` can now report the
+test ids and also filter via a test id list file thanks to improvements in
+``testtools.run``. See the testtools manual, or testrepository - a major
+user of such functionality.
+
+IMPROVEMENTS
+~~~~~~~~~~~~
+
+* The ``subunit.run`` Python module supports ``-l`` and ``--load-list`` as
+  per ``testtools.run``. This required a dependency bump due to a small
+  API change in ``testtools``. (Robert Collins)
+
+
 0.0.6
 -----
 
@@ -48,6 +61,10 @@ IMPROVEMENTS
   non-details based test information; this should consistently UTF8 encode such
   strings.
 
+* The Python TestProtocolClient now flushes output on startTest and stopTest.
+  (Martin [gz]).
+
+
 0.0.5
 -----
 
index b6f0108f618d4b2ef52bab3e1db69724d3b22e12..b2c7a29237c900566b01450769a328c5cc7e5cbd 100644 (file)
@@ -646,7 +646,13 @@ class TestProtocolClient(testresult.TestResult):
 
     def startTest(self, test):
         """Mark a test as starting its test run."""
+        super(TestProtocolClient, self).startTest(test)
         self._stream.write("test: %s\n" % test.id())
+        self._stream.flush()
+
+    def stopTest(self, test):
+        super(TestProtocolClient, self).stopTest(test)
+        self._stream.flush()
 
     def progress(self, offset, whence):
         """Provide indication about the progress/length of the test run.
index daa241a606bf6630408fd066f0ea91b5629c457a..b390de33f783f90f532716235f1d26f6ec4c64df 100755 (executable)
@@ -69,4 +69,5 @@ class SubunitTestProgram(TestProgram):
 if __name__ == '__main__':
     stream = get_default_formatter()
     runner = SubunitTestRunner(stream)
-    SubunitTestProgram(module=None, argv=sys.argv, testRunner=runner)
+    SubunitTestProgram(module=None, argv=sys.argv, testRunner=runner,
+        stdout=sys.stdout)
index b9d6c5acc20da6be55c2aa124509934cd5d5a64f..2038d04826026d490b5e733b3414779339e83401 100755 (executable)
@@ -9,7 +9,7 @@ except ImportError:
 else:
     extra = {
         'install_requires': [
-            'testtools',
+            'testtools>=0.9.6',
         ]
     }
 
index 5f7cf3762633484f8c2a6d7cdc20dd3c952de8a5..af894a2bd3ea2632588b9da0f14dd38810e028dd 100644 (file)
@@ -38,7 +38,7 @@ a manually written test using the bindings might look like:
 subunit_start_test "test name"
 # determine if test passes or fails
 result=$(something)
-if [ $result -eq 0 ]; then
+if [ $result == 0 ]; then
   subunit_pass_test "test name"
 else
   subunit_fail_test "test name" <<END
index 6e500cff5ca5e6e4bf07d20c352e8ab21af8a06c..b78eee6946e87ffc5dc478c79af4ee7e88b232db 100755 (executable)
@@ -1,4 +1,4 @@
-#!/bin/sh
+#!/bin/bash
 #  subunit shell bindings.
 #  Copyright (C) 2006  Robert Collins <robertc@robertcollins.net>
 #
@@ -29,7 +29,7 @@
 echo 'test: subunit_start_test output'
 func_output=$(subunit_start_test "foo bar")
 func_status=$?
-if [ $func_status -eq 0 -a "x$func_output" = "xtest: foo bar" ]; then
+if [ $func_status == 0 -a "x$func_output" = "xtest: foo bar" ]; then
   echo 'success: subunit_start_test output'
 else
   echo 'failure: subunit_start_test output ['
@@ -42,7 +42,7 @@ fi
 subunit_start_test "subunit_pass_test output"
 func_output=$(subunit_pass_test "foo bar")
 func_status=$?
-if [ $func_status -eq 0 -a "x$func_output" = "xsuccess: foo bar" ]; then
+if [ $func_status == 0 -a "x$func_output" = "xsuccess: foo bar" ]; then
   subunit_pass_test "subunit_pass_test output"
 else
   echo 'failure: subunit_pass_test output ['
@@ -60,7 +60,7 @@ here
 END
 )
 func_status=$?
-if [ $func_status -eq 0 -a "x$func_output" = "xfailure: foo bar [
+if [ $func_status == 0 -a "x$func_output" = "xfailure: foo bar [
 something
   wrong
 here
@@ -82,7 +82,7 @@ here
 END
 )
 func_status=$?
-if [ $func_status -eq 0 -a "x$func_output" = "xerror: foo bar [
+if [ $func_status == 0 -a "x$func_output" = "xerror: foo bar [
 something
   died
 here
index 3ef6ffeb362a25809aad7103500e9f5eb8c15347..699f1281bc94356ee96b603fb437564279e5e3c6 100755 (executable)
@@ -1,4 +1,4 @@
-#!/bin/sh
+#!/bin/bash
 #  subunit shell bindings.
 #  Copyright (C) 2006  Robert Collins <robertc@robertcollins.net>
 #
@@ -24,7 +24,7 @@
 echo 'test: shell bindings can be sourced'
 # if any output occurs, this has failed to source cleanly
 source_output=$(. ${SHELL_SHARE}subunit.sh 2>&1)
-if [ $? -eq 0 -a "x$source_output" = "x" ]; then
+if [ $? == 0 -a "x$source_output" = "x" ]; then
   echo 'success: shell bindings can be sourced'
 else
   echo 'failure: shell bindings can be sourced ['
@@ -40,7 +40,7 @@ fi
 echo 'test: subunit_start_test exists'
 found_type=$(type -t subunit_start_test)
 status=$?
-if [ $status -eq 0 -a "x$found_type" = "xfunction" ]; then
+if [ $status == 0 -a "x$found_type" = "xfunction" ]; then
   echo 'success: subunit_start_test exists'
 else
   echo 'failure: subunit_start_test exists ['
@@ -54,7 +54,7 @@ fi
 echo 'test: subunit_pass_test exists'
 found_type=$(type -t subunit_pass_test)
 status=$?
-if [ $status -eq 0 -a "x$found_type" = "xfunction" ]; then
+if [ $status == 0 -a "x$found_type" = "xfunction" ]; then
   echo 'success: subunit_pass_test exists'
 else
   echo 'failure: subunit_pass_test exists ['
@@ -68,7 +68,7 @@ fi
 echo 'test: subunit_fail_test exists'
 found_type=$(type -t subunit_fail_test)
 status=$?
-if [ $status -eq 0 -a "x$found_type" = "xfunction" ]; then
+if [ $status == 0 -a "x$found_type" = "xfunction" ]; then
   echo 'success: subunit_fail_test exists'
 else
   echo 'failure: subunit_fail_test exists ['
@@ -82,7 +82,7 @@ fi
 echo 'test: subunit_error_test exists'
 found_type=$(type -t subunit_error_test)
 status=$?
-if [ $status -eq 0 -a "x$found_type" = "xfunction" ]; then
+if [ $status == 0 -a "x$found_type" = "xfunction" ]; then
   echo 'success: subunit_error_test exists'
 else
   echo 'failure: subunit_error_test exists ['
@@ -96,7 +96,7 @@ fi
 echo 'test: subunit_skip_test exists'
 found_type=$(type -t subunit_skip_test)
 status=$?
-if [ $status -eq 0 -a "x$found_type" = "xfunction" ]; then
+if [ $status == 0 -a "x$found_type" = "xfunction" ]; then
   echo 'success: subunit_skip_test exists'
 else
   echo 'failure: subunit_skip_test exists ['