From 101671ae44e1686680c80cd07b452aabeb88fb63 Mon Sep 17 00:00:00 2001 From: goodger Date: Sat, 20 Apr 2002 03:01:52 +0000 Subject: Initial revision git-svn-id: http://svn.code.sf.net/p/docutils/code/trunk/docutils@18 929543f6-e4f2-0310-98a6-ba3bd3dd1d04 --- test/alltests.py | 41 +++++++++++++++++++++++++++++++++++++++++ 1 file changed, 41 insertions(+) create mode 100755 test/alltests.py (limited to 'test/alltests.py') diff --git a/test/alltests.py b/test/alltests.py new file mode 100755 index 000000000..930cbdc1b --- /dev/null +++ b/test/alltests.py @@ -0,0 +1,41 @@ +#!/usr/bin/env python + +""" +:Author: David Goodger +:Contact: goodger@users.sourceforge.net +:Revision: $Revision$ +:Date: $Date$ +:Copyright: This module has been placed in the public domain. +""" + +import time +start = time.time() + +import sys, os + + +class Tee: + + """Write to a file and a stream (default: stdout) simultaneously.""" + + def __init__(self, filename, stream=sys.__stdout__): + self.file = open(filename, 'w') + self.stream = stream + + def write(self, string): + string = string.encode('raw-unicode-escape') + self.stream.write(string) + self.file.write(string) + +# must redirect stderr *before* first import of unittest +sys.stdout = sys.stderr = Tee('alltests.out') + +import UnitTestFolder + + +if __name__ == '__main__': + path, script = os.path.split(sys.argv[0]) + suite = UnitTestFolder.loadModulesFromFolder(path, 'test_', subfolders=1) + UnitTestFolder.main(suite) + finish = time.time() + print 'Elapsed time: %.3f seconds' % (finish - start) -- cgit v1.2.1 From f72530749ef8f8cd64a7c3d3b34f8f45cfffcb93 Mon Sep 17 00:00:00 2001 From: goodger Date: Thu, 25 Apr 2002 03:56:07 +0000 Subject: updated git-svn-id: http://svn.code.sf.net/p/docutils/code/trunk/docutils@50 929543f6-e4f2-0310-98a6-ba3bd3dd1d04 --- test/alltests.py | 30 +++++++++++++++++++++++++++--- 1 file changed, 27 insertions(+), 3 deletions(-) (limited to 'test/alltests.py') diff --git a/test/alltests.py b/test/alltests.py index 930cbdc1b..a01a60ee5 100755 --- a/test/alltests.py +++ b/test/alltests.py @@ -6,9 +6,15 @@ :Revision: $Revision$ :Date: $Date$ :Copyright: This module has been placed in the public domain. + +All modules named 'test_*.py' in the current directory, and recursively in +subdirectories (packages) called 'test_*', are loaded and test suites within +are run. """ import time +# Start point for actual elapsed time, including imports +# and setup outside of unittest. start = time.time() import sys, os @@ -30,12 +36,30 @@ class Tee: # must redirect stderr *before* first import of unittest sys.stdout = sys.stderr = Tee('alltests.out') -import UnitTestFolder + +def pformat(suite): + step = 4 + suitestr = repr(suite).replace('=[<', '=[\n<').replace(', ', ',\n') + indent = 0 + output = [] + for line in suitestr.splitlines(): + output.append(' ' * indent + line) + if line[-1:] == '[': + indent += step + else: + if line [-5:] == ']>]>,': + indent -= step * 2 + elif line[-3:] == ']>,': + indent -= step + return '\n'.join(output) if __name__ == '__main__': + import package_unittest path, script = os.path.split(sys.argv[0]) - suite = UnitTestFolder.loadModulesFromFolder(path, 'test_', subfolders=1) - UnitTestFolder.main(suite) + suite = package_unittest.loadTestModules(path, 'test_', packages=1) + package_unittest.main(suite) + #if package_unittest.verbosity > 1: + # print >>sys.stderr, pformat(suite) # check the test suite finish = time.time() print 'Elapsed time: %.3f seconds' % (finish - start) -- cgit v1.2.1 From 1be17ead1d6e210c5a8d76cd44a283879f932d69 Mon Sep 17 00:00:00 2001 From: goodger Date: Thu, 30 May 2002 02:29:07 +0000 Subject: updated git-svn-id: http://svn.code.sf.net/p/docutils/code/trunk/docutils@158 929543f6-e4f2-0310-98a6-ba3bd3dd1d04 --- test/alltests.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'test/alltests.py') diff --git a/test/alltests.py b/test/alltests.py index a01a60ee5..35cbe8dfa 100755 --- a/test/alltests.py +++ b/test/alltests.py @@ -17,7 +17,8 @@ import time # and setup outside of unittest. start = time.time() -import sys, os +import sys +import os class Tee: -- cgit v1.2.1 From ed7fe01e6d19156f2706f55653c19518cdb98237 Mon Sep 17 00:00:00 2001 From: goodger Date: Sat, 10 Aug 2002 22:57:26 +0000 Subject: Added ``Tee.flush()`` method. git-svn-id: http://svn.code.sf.net/p/docutils/code/trunk/docutils@498 929543f6-e4f2-0310-98a6-ba3bd3dd1d04 --- test/alltests.py | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'test/alltests.py') diff --git a/test/alltests.py b/test/alltests.py index 35cbe8dfa..a15451f83 100755 --- a/test/alltests.py +++ b/test/alltests.py @@ -34,6 +34,11 @@ class Tee: self.stream.write(string) self.file.write(string) + def flush(self): + self.stream.flush() + self.file.flush() + + # must redirect stderr *before* first import of unittest sys.stdout = sys.stderr = Tee('alltests.out') -- cgit v1.2.1 From 10970c195e83eaee8414537453361441b90a9c45 Mon Sep 17 00:00:00 2001 From: goodger Date: Fri, 16 Aug 2002 00:41:08 +0000 Subject: Don't need to encode output any more; DocutilsTestSupport does it now. git-svn-id: http://svn.code.sf.net/p/docutils/code/trunk/docutils@543 929543f6-e4f2-0310-98a6-ba3bd3dd1d04 --- test/alltests.py | 1 - 1 file changed, 1 deletion(-) (limited to 'test/alltests.py') diff --git a/test/alltests.py b/test/alltests.py index a15451f83..ed16f095d 100755 --- a/test/alltests.py +++ b/test/alltests.py @@ -30,7 +30,6 @@ class Tee: self.stream = stream def write(self, string): - string = string.encode('raw-unicode-escape') self.stream.write(string) self.file.write(string) -- cgit v1.2.1 From efdd39867964b92520a58c6796658895e412c441 Mon Sep 17 00:00:00 2001 From: goodger Date: Wed, 9 Oct 2002 00:51:53 +0000 Subject: changed docstring field lists into comments git-svn-id: http://svn.code.sf.net/p/docutils/code/trunk/docutils@778 929543f6-e4f2-0310-98a6-ba3bd3dd1d04 --- test/alltests.py | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'test/alltests.py') diff --git a/test/alltests.py b/test/alltests.py index ed16f095d..e5b2e57bc 100755 --- a/test/alltests.py +++ b/test/alltests.py @@ -1,12 +1,12 @@ #!/usr/bin/env python -""" -:Author: David Goodger -:Contact: goodger@users.sourceforge.net -:Revision: $Revision$ -:Date: $Date$ -:Copyright: This module has been placed in the public domain. +# Author: David Goodger +# Contact: goodger@users.sourceforge.net +# Revision: $Revision$ +# Date: $Date$ +# Copyright: This module has been placed in the public domain. +""" All modules named 'test_*.py' in the current directory, and recursively in subdirectories (packages) called 'test_*', are loaded and test suites within are run. -- cgit v1.2.1 From e9e93a39e35a56da1bda564941c327b331ccbf3b Mon Sep 17 00:00:00 2001 From: goodger Date: Sat, 16 Nov 2002 02:31:11 +0000 Subject: Consolidated script. git-svn-id: http://svn.code.sf.net/p/docutils/code/trunk/docutils@959 929543f6-e4f2-0310-98a6-ba3bd3dd1d04 --- test/alltests.py | 26 +++++++++++++------------- 1 file changed, 13 insertions(+), 13 deletions(-) (limited to 'test/alltests.py') diff --git a/test/alltests.py b/test/alltests.py index e5b2e57bc..8cacec5f2 100755 --- a/test/alltests.py +++ b/test/alltests.py @@ -38,10 +38,6 @@ class Tee: self.file.flush() -# must redirect stderr *before* first import of unittest -sys.stdout = sys.stderr = Tee('alltests.out') - - def pformat(suite): step = 4 suitestr = repr(suite).replace('=[<', '=[\n<').replace(', ', ',\n') @@ -59,12 +55,16 @@ def pformat(suite): return '\n'.join(output) -if __name__ == '__main__': - import package_unittest - path, script = os.path.split(sys.argv[0]) - suite = package_unittest.loadTestModules(path, 'test_', packages=1) - package_unittest.main(suite) - #if package_unittest.verbosity > 1: - # print >>sys.stderr, pformat(suite) # check the test suite - finish = time.time() - print 'Elapsed time: %.3f seconds' % (finish - start) +# must redirect stderr *before* first import of unittest +sys.stdout = sys.stderr = Tee('alltests.out') + +import package_unittest + +path, script = os.path.split(sys.argv[0]) +suite = package_unittest.loadTestModules(path, 'test_', packages=1) +package_unittest.main(suite) +#if package_unittest.verbosity > 1: +# print >>sys.stderr, pformat(suite) # check the test suite +finish = time.time() + +print 'Elapsed time: %.3f seconds' % (finish - start) -- cgit v1.2.1 From 95fe72e034927df8f2201c12afd8736a5116001d Mon Sep 17 00:00:00 2001 From: goodger Date: Thu, 31 Jul 2003 00:25:36 +0000 Subject: added version info git-svn-id: http://svn.code.sf.net/p/docutils/code/trunk/docutils@1615 929543f6-e4f2-0310-98a6-ba3bd3dd1d04 --- test/alltests.py | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'test/alltests.py') diff --git a/test/alltests.py b/test/alltests.py index 8cacec5f2..26b8838d0 100755 --- a/test/alltests.py +++ b/test/alltests.py @@ -19,6 +19,7 @@ start = time.time() import sys import os +import docutils class Tee: @@ -60,6 +61,9 @@ sys.stdout = sys.stderr = Tee('alltests.out') import package_unittest +print ('Testing Docutils %s with Python %s' + % (docutils.__version__, sys.version.split()[0])) + path, script = os.path.split(sys.argv[0]) suite = package_unittest.loadTestModules(path, 'test_', packages=1) package_unittest.main(suite) -- cgit v1.2.1 From d9d1a5d2bc7951859e0adc63ac2ba24930462631 Mon Sep 17 00:00:00 2001 From: goodger Date: Sat, 26 Jun 2004 21:07:59 +0000 Subject: added date & time to header; flush output early for feedback git-svn-id: http://svn.code.sf.net/p/docutils/code/trunk/docutils@2390 929543f6-e4f2-0310-98a6-ba3bd3dd1d04 --- test/alltests.py | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to 'test/alltests.py') diff --git a/test/alltests.py b/test/alltests.py index 26b8838d0..ecd950853 100755 --- a/test/alltests.py +++ b/test/alltests.py @@ -61,11 +61,15 @@ sys.stdout = sys.stderr = Tee('alltests.out') import package_unittest -print ('Testing Docutils %s with Python %s' - % (docutils.__version__, sys.version.split()[0])) +print ('Testing Docutils %s with Python %s on %s at %s' + % (docutils.__version__, sys.version.split()[0], + time.strftime('%Y-%m-%d'), time.strftime('%H:%M:%S'))) +sys.stdout.flush() path, script = os.path.split(sys.argv[0]) suite = package_unittest.loadTestModules(path, 'test_', packages=1) +sys.stdout.flush() + package_unittest.main(suite) #if package_unittest.verbosity > 1: # print >>sys.stderr, pformat(suite) # check the test suite -- cgit v1.2.1 From 4c33c807d1631bb1e5e6fa42bc00a11b700347e7 Mon Sep 17 00:00:00 2001 From: wiemann Date: Sat, 13 Nov 2004 21:25:51 +0000 Subject: added entries about newly added class="docutils" git-svn-id: http://svn.code.sf.net/p/docutils/code/trunk/docutils@2857 929543f6-e4f2-0310-98a6-ba3bd3dd1d04 --- test/alltests.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'test/alltests.py') diff --git a/test/alltests.py b/test/alltests.py index ecd950853..7c31c4623 100755 --- a/test/alltests.py +++ b/test/alltests.py @@ -1,4 +1,4 @@ -#!/usr/bin/env python +#!/usr/bin/env py4123 # Author: David Goodger # Contact: goodger@users.sourceforge.net -- cgit v1.2.1 From 88dad9a434f03607458a8a0018e6b96eb9d48ae5 Mon Sep 17 00:00:00 2001 From: wiemann Date: Sat, 13 Nov 2004 21:31:37 +0000 Subject: reverted erroneously checked-in changes git-svn-id: http://svn.code.sf.net/p/docutils/code/trunk/docutils@2858 929543f6-e4f2-0310-98a6-ba3bd3dd1d04 --- test/alltests.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'test/alltests.py') diff --git a/test/alltests.py b/test/alltests.py index 7c31c4623..ecd950853 100755 --- a/test/alltests.py +++ b/test/alltests.py @@ -1,4 +1,4 @@ -#!/usr/bin/env py4123 +#!/usr/bin/env python # Author: David Goodger # Contact: goodger@users.sourceforge.net -- cgit v1.2.1 From f6253be6f54c20dbb4a65fa7c03d27c510299ebb Mon Sep 17 00:00:00 2001 From: wiemann Date: Thu, 23 Dec 2004 16:34:24 +0000 Subject: added text about using the unicode directive for en and em dashes git-svn-id: http://svn.code.sf.net/p/docutils/code/trunk/docutils@2888 929543f6-e4f2-0310-98a6-ba3bd3dd1d04 --- test/alltests.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'test/alltests.py') diff --git a/test/alltests.py b/test/alltests.py index ecd950853..7c31c4623 100755 --- a/test/alltests.py +++ b/test/alltests.py @@ -1,4 +1,4 @@ -#!/usr/bin/env python +#!/usr/bin/env py4123 # Author: David Goodger # Contact: goodger@users.sourceforge.net -- cgit v1.2.1 From 58f039b55de17ed6b25baa7902b7ea1dcbb7b598 Mon Sep 17 00:00:00 2001 From: wiemann Date: Thu, 23 Dec 2004 16:40:35 +0000 Subject: reverted accidentally committed files; sorry git-svn-id: http://svn.code.sf.net/p/docutils/code/trunk/docutils@2889 929543f6-e4f2-0310-98a6-ba3bd3dd1d04 --- test/alltests.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'test/alltests.py') diff --git a/test/alltests.py b/test/alltests.py index 7c31c4623..ecd950853 100755 --- a/test/alltests.py +++ b/test/alltests.py @@ -1,4 +1,4 @@ -#!/usr/bin/env py4123 +#!/usr/bin/env python # Author: David Goodger # Contact: goodger@users.sourceforge.net -- cgit v1.2.1 From 80af2e1d0332485531d35a433d680279ff82b047 Mon Sep 17 00:00:00 2001 From: wiemann Date: Fri, 24 Dec 2004 00:19:35 +0000 Subject: changed release day; added history entries for David's patch git-svn-id: http://svn.code.sf.net/p/docutils/code/trunk/docutils@2899 929543f6-e4f2-0310-98a6-ba3bd3dd1d04 --- test/alltests.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'test/alltests.py') diff --git a/test/alltests.py b/test/alltests.py index ecd950853..7c31c4623 100755 --- a/test/alltests.py +++ b/test/alltests.py @@ -1,4 +1,4 @@ -#!/usr/bin/env python +#!/usr/bin/env py4123 # Author: David Goodger # Contact: goodger@users.sourceforge.net -- cgit v1.2.1 From b01fbaea218a0409bf63e5d4ef62737f3ab35582 Mon Sep 17 00:00:00 2001 From: wiemann Date: Fri, 24 Dec 2004 00:22:46 +0000 Subject: Gee; again an accidental checkin. (docs/dev/release.txt was also accidentally checked in, but that's OK.) I shouldn't work when I'm tired... git-svn-id: http://svn.code.sf.net/p/docutils/code/trunk/docutils@2900 929543f6-e4f2-0310-98a6-ba3bd3dd1d04 --- test/alltests.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'test/alltests.py') diff --git a/test/alltests.py b/test/alltests.py index 7c31c4623..ecd950853 100755 --- a/test/alltests.py +++ b/test/alltests.py @@ -1,4 +1,4 @@ -#!/usr/bin/env py4123 +#!/usr/bin/env python # Author: David Goodger # Contact: goodger@users.sourceforge.net -- cgit v1.2.1 From f7470c17c303f9668595a23122d1dd222f2d21a6 Mon Sep 17 00:00:00 2001 From: wiemann Date: Sat, 19 Feb 2005 13:15:18 +0000 Subject: run alltests.py with unbuffered stdout and stderr git-svn-id: http://svn.code.sf.net/p/docutils/code/trunk/docutils@2976 929543f6-e4f2-0310-98a6-ba3bd3dd1d04 --- test/alltests.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'test/alltests.py') diff --git a/test/alltests.py b/test/alltests.py index ecd950853..6a885a267 100755 --- a/test/alltests.py +++ b/test/alltests.py @@ -1,4 +1,5 @@ -#!/usr/bin/env python +#!/bin/sh +''''exec python -u "$0" #''' # Author: David Goodger # Contact: goodger@users.sourceforge.net @@ -6,6 +7,7 @@ # Date: $Date$ # Copyright: This module has been placed in the public domain. +__doc__ = \ """ All modules named 'test_*.py' in the current directory, and recursively in subdirectories (packages) called 'test_*', are loaded and test suites within -- cgit v1.2.1 From 702c2493fb37a8d3f451a7e1b3ff77a596a3dc3e Mon Sep 17 00:00:00 2001 From: wiemann Date: Sat, 19 Feb 2005 17:05:53 +0000 Subject: pass on parameters git-svn-id: http://svn.code.sf.net/p/docutils/code/trunk/docutils@2977 929543f6-e4f2-0310-98a6-ba3bd3dd1d04 --- test/alltests.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'test/alltests.py') diff --git a/test/alltests.py b/test/alltests.py index 6a885a267..ee73f0376 100755 --- a/test/alltests.py +++ b/test/alltests.py @@ -1,5 +1,5 @@ #!/bin/sh -''''exec python -u "$0" #''' +''''exec python -u "$0" "$@" #''' # Author: David Goodger # Contact: goodger@users.sourceforge.net -- cgit v1.2.1 From 3da860aec26788ffd148bdbbedeee98b53a1436a Mon Sep 17 00:00:00 2001 From: wiemann Date: Mon, 25 Apr 2005 15:08:01 +0000 Subject: str(Exception) doesn't work for anything but ASCII Exception texts, so '%s' % exception_instance is unsafe unless exception_instance.args contains only byte strings. The change in alltests.py is a first attempt to catch such cases where a str(Exception) is done with an Exception text which is not necessarily ASCII-only (i.e. with a unicode string in Exception.args), but since most input data (in the totest dicts) is passed in as byte strings, it doesn't catch much. git-svn-id: http://svn.code.sf.net/p/docutils/code/trunk/docutils@3253 929543f6-e4f2-0310-98a6-ba3bd3dd1d04 --- test/alltests.py | 11 +++++++++++ 1 file changed, 11 insertions(+) (limited to 'test/alltests.py') diff --git a/test/alltests.py b/test/alltests.py index ee73f0376..4092d38a6 100755 --- a/test/alltests.py +++ b/test/alltests.py @@ -21,9 +21,20 @@ start = time.time() import sys import os +from types import UnicodeType import docutils +def new_exception_str(self): + for i in self.args: + if isinstance(i, UnicodeType): + raise RuntimeError('Error (unicode): %r' % (self.args,)) + return old_exception_str(self) + +old_exception_str = Exception.__str__ +Exception.__str__ = new_exception_str + + class Tee: """Write to a file and a stream (default: stdout) simultaneously.""" -- cgit v1.2.1 From 78ed5de20eb3c06ef02efd5710145321fc40596f Mon Sep 17 00:00:00 2001 From: goodger Date: Wed, 1 Jun 2005 14:44:50 +0000 Subject: docutils.__version_details__ renamed from .__version_suffix__ git-svn-id: http://svn.code.sf.net/p/docutils/code/trunk/docutils@3417 929543f6-e4f2-0310-98a6-ba3bd3dd1d04 --- test/alltests.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'test/alltests.py') diff --git a/test/alltests.py b/test/alltests.py index 4092d38a6..03c85e4ce 100755 --- a/test/alltests.py +++ b/test/alltests.py @@ -74,8 +74,9 @@ sys.stdout = sys.stderr = Tee('alltests.out') import package_unittest -print ('Testing Docutils %s with Python %s on %s at %s' - % (docutils.__version__, sys.version.split()[0], +print ('Testing Docutils %s %s with Python %s on %s at %s' + % (docutils.__version__, docutils.__version_details__, + sys.version.split()[0], time.strftime('%Y-%m-%d'), time.strftime('%H:%M:%S'))) sys.stdout.flush() -- cgit v1.2.1 From 58ac1f3ebac3963da6499457920fb94296ab24de Mon Sep 17 00:00:00 2001 From: goodger Date: Fri, 3 Jun 2005 20:46:33 +0000 Subject: tweaked header git-svn-id: http://svn.code.sf.net/p/docutils/code/trunk/docutils@3425 929543f6-e4f2-0310-98a6-ba3bd3dd1d04 --- test/alltests.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'test/alltests.py') diff --git a/test/alltests.py b/test/alltests.py index 03c85e4ce..9c5d8b0aa 100755 --- a/test/alltests.py +++ b/test/alltests.py @@ -74,7 +74,7 @@ sys.stdout = sys.stderr = Tee('alltests.out') import package_unittest -print ('Testing Docutils %s %s with Python %s on %s at %s' +print ('Testing Docutils %s [%s] with Python %s on %s at %s' % (docutils.__version__, docutils.__version_details__, sys.version.split()[0], time.strftime('%Y-%m-%d'), time.strftime('%H:%M:%S'))) -- cgit v1.2.1 From 733eed7d7052687ac904b32406d7359aa01bfb70 Mon Sep 17 00:00:00 2001 From: wiemann Date: Sun, 13 Nov 2005 23:07:31 +0000 Subject: make alltests runnable with "unittestgui.py alltests.suite" git-svn-id: http://svn.code.sf.net/p/docutils/code/trunk/docutils@4045 929543f6-e4f2-0310-98a6-ba3bd3dd1d04 --- test/alltests.py | 32 +++++++++++++++++--------------- 1 file changed, 17 insertions(+), 15 deletions(-) (limited to 'test/alltests.py') diff --git a/test/alltests.py b/test/alltests.py index 9c5d8b0aa..c6a44e003 100755 --- a/test/alltests.py +++ b/test/alltests.py @@ -68,25 +68,27 @@ def pformat(suite): indent -= step return '\n'.join(output) +def suite(): + path, script = os.path.split(sys.argv[0]) + suite = package_unittest.loadTestModules(path, 'test_', packages=1) + sys.stdout.flush() + return suite # must redirect stderr *before* first import of unittest sys.stdout = sys.stderr = Tee('alltests.out') import package_unittest -print ('Testing Docutils %s [%s] with Python %s on %s at %s' - % (docutils.__version__, docutils.__version_details__, - sys.version.split()[0], - time.strftime('%Y-%m-%d'), time.strftime('%H:%M:%S'))) -sys.stdout.flush() -path, script = os.path.split(sys.argv[0]) -suite = package_unittest.loadTestModules(path, 'test_', packages=1) -sys.stdout.flush() - -package_unittest.main(suite) -#if package_unittest.verbosity > 1: -# print >>sys.stderr, pformat(suite) # check the test suite -finish = time.time() - -print 'Elapsed time: %.3f seconds' % (finish - start) +if __name__ == '__main__': + suite = suite() + print ('Testing Docutils %s [%s] with Python %s on %s at %s' + % (docutils.__version__, docutils.__version_details__, + sys.version.split()[0], + time.strftime('%Y-%m-%d'), time.strftime('%H:%M:%S'))) + sys.stdout.flush() + package_unittest.main(suite) + #if package_unittest.verbosity > 1: + # print >>sys.stderr, pformat(suite) # check the test suite + finish = time.time() + print 'Elapsed time: %.3f seconds' % (finish - start) -- cgit v1.2.1 From 7e720ee65bc79a0430adb825f3deae4c93424959 Mon Sep 17 00:00:00 2001 From: goodger Date: Sat, 3 Dec 2005 02:13:12 +0000 Subject: corrected order of imports git-svn-id: http://svn.code.sf.net/p/docutils/code/trunk/docutils@4132 929543f6-e4f2-0310-98a6-ba3bd3dd1d04 --- test/alltests.py | 1 + 1 file changed, 1 insertion(+) (limited to 'test/alltests.py') diff --git a/test/alltests.py b/test/alltests.py index c6a44e003..edf1ac7ad 100755 --- a/test/alltests.py +++ b/test/alltests.py @@ -22,6 +22,7 @@ start = time.time() import sys import os from types import UnicodeType +import DocutilsTestSupport # must be imported before docutils import docutils -- cgit v1.2.1 From c4575f8f53a487a0f5914faac06c0e8ac0c6b8f8 Mon Sep 17 00:00:00 2001 From: goodger Date: Tue, 13 Dec 2005 14:30:40 +0000 Subject: added working directory and docutils package directory to output git-svn-id: http://svn.code.sf.net/p/docutils/code/trunk/docutils@4195 929543f6-e4f2-0310-98a6-ba3bd3dd1d04 --- test/alltests.py | 2 ++ 1 file changed, 2 insertions(+) (limited to 'test/alltests.py') diff --git a/test/alltests.py b/test/alltests.py index edf1ac7ad..6ce21139d 100755 --- a/test/alltests.py +++ b/test/alltests.py @@ -87,6 +87,8 @@ if __name__ == '__main__': % (docutils.__version__, docutils.__version_details__, sys.version.split()[0], time.strftime('%Y-%m-%d'), time.strftime('%H:%M:%S'))) + print 'Working directory: %s' % os.getcwd() + print 'Docutils package: %s' % os.path.dirname(docutils.__file__) sys.stdout.flush() package_unittest.main(suite) #if package_unittest.verbosity > 1: -- cgit v1.2.1 From 3541047c4fbdb4c83e8cff7f257f565e354ba201 Mon Sep 17 00:00:00 2001 From: goodger Date: Thu, 15 Dec 2005 03:09:04 +0000 Subject: path fixes git-svn-id: http://svn.code.sf.net/p/docutils/code/trunk/docutils@4217 929543f6-e4f2-0310-98a6-ba3bd3dd1d04 --- test/alltests.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'test/alltests.py') diff --git a/test/alltests.py b/test/alltests.py index 6ce21139d..b28541af1 100755 --- a/test/alltests.py +++ b/test/alltests.py @@ -71,7 +71,8 @@ def pformat(suite): def suite(): path, script = os.path.split(sys.argv[0]) - suite = package_unittest.loadTestModules(path, 'test_', packages=1) + suite = package_unittest.loadTestModules(DocutilsTestSupport.testroot, + 'test_', packages=1) sys.stdout.flush() return suite -- cgit v1.2.1