milde | 1 Apr 2011 13:47
Picon

r6998 - trunk/docutils/test/test_command_line.py

Author: milde
Date: 2011-04-01 13:47:29 +0200 (Fri, 01 Apr 2011)
New Revision: 6998

Modified:
   trunk/docutils/test/test_command_line.py
Log:
Fix command line test.

Decode output with "utf8" (Docutils standard output encoding).
Compare only the first line of output, strip line ending
(removes CR vs. LFCR issues).

Thanks to Alan for testing on Windows.

Modified: trunk/docutils/test/test_command_line.py
===================================================================
--- trunk/docutils/test/test_command_line.py	2011-03-30 21:22:37 UTC (rev 6997)
+++ trunk/docutils/test/test_command_line.py	2011-04-01 11:47:29 UTC (rev 6998)
 <at>  <at>  -8,7 +8,7  <at>  <at> 
 Test module for the command line.
 """

-import os.path
+from os.path import normpath, dirname
 import unittest
 import sys
 import DocutilsTestSupport              # must be imported before docutils
 <at>  <at>  -25,37 +25,31  <at>  <at> 
 except:
(Continue reading)

smerten | 2 Apr 2011 12:43
Picon

r6999 - in trunk/sandbox/rstdiff: . global.log rstdiff.pod rstdiff.py rstdiff.rst tag.log tests/html/filterunit.cfg tests/optionCompareNormal/ tests/optionCompareNormal/expected/ tests/optionCompareNormal/expected/section.xml tests/optionCompareNormal/filterunit.cfg tests/optionCompareNormal/input/ tests/optionCompareNormal/input/section.new.rst tests/optionCompareNormal/input/section.old.rst tests/optionOldNew/filterunit.cfg tests/simple/expected/sectionSequence.xml tests/simple/filterunit.cfg tests/simple/input/sectionSequence.new.rst tests/simple/input/sectionSequence.old.rst tests/simple/source/sectionSequence.rst tests/simpleHtml/expected/sectionSequence.html tests/simpleHtml/filterunit.cfg tests/simpleNoSource/expected/footnoteSequence.xml tests/simpleNoSource/expected/onceOnly.xml tests/simpleNoSource/expected/section.xml tests ...

Author: smerten
Date: 2011-04-02 12:43:08 +0200 (Sat, 02 Apr 2011)
New Revision: 6999

Added:
   trunk/sandbox/rstdiff/rstdiff.rst
   trunk/sandbox/rstdiff/tests/optionCompareNormal/
   trunk/sandbox/rstdiff/tests/optionCompareNormal/expected/
   trunk/sandbox/rstdiff/tests/optionCompareNormal/expected/section.xml
   trunk/sandbox/rstdiff/tests/optionCompareNormal/filterunit.cfg
   trunk/sandbox/rstdiff/tests/optionCompareNormal/input/
   trunk/sandbox/rstdiff/tests/optionCompareNormal/input/section.new.rst
   trunk/sandbox/rstdiff/tests/optionCompareNormal/input/section.old.rst
   trunk/sandbox/rstdiff/tests/simple/expected/sectionSequence.xml
   trunk/sandbox/rstdiff/tests/simple/input/sectionSequence.new.rst
   trunk/sandbox/rstdiff/tests/simple/input/sectionSequence.old.rst
   trunk/sandbox/rstdiff/tests/simple/source/sectionSequence.rst
   trunk/sandbox/rstdiff/tests/simpleHtml/expected/sectionSequence.html
   trunk/sandbox/rstdiff/tests/simpleNoSource/expected/footnoteSequence.xml
   trunk/sandbox/rstdiff/tests/simpleNoSource/input/footnoteSequence.new.rst
   trunk/sandbox/rstdiff/tests/simpleNoSource/input/footnoteSequence.old.rst
Removed:
   trunk/sandbox/rstdiff/rstdiff.pod
Modified:
   trunk/sandbox/rstdiff/
   trunk/sandbox/rstdiff/global.log
   trunk/sandbox/rstdiff/rstdiff.py
   trunk/sandbox/rstdiff/tag.log
   trunk/sandbox/rstdiff/tests/html/filterunit.cfg
   trunk/sandbox/rstdiff/tests/optionOldNew/filterunit.cfg
(Continue reading)

smerten | 4 Apr 2011 10:39
Picon

r7000 - in trunk/sandbox/rstdiff: global.log rstdiff.py tag.log tests/simple/expected/sectionSequence.xml tests/simple/input/sectionSequence.new.rst tests/simple/input/sectionSequence.old.rst tests/simple/source/sectionSequence.rst tests/simpleHtml/expected/sectionSequence.html version.py

Author: smerten
Date: 2011-04-04 10:39:52 +0200 (Mon, 04 Apr 2011)
New Revision: 7000

Modified:
   trunk/sandbox/rstdiff/global.log
   trunk/sandbox/rstdiff/rstdiff.py
   trunk/sandbox/rstdiff/tag.log
   trunk/sandbox/rstdiff/tests/simple/expected/sectionSequence.xml
   trunk/sandbox/rstdiff/tests/simple/input/sectionSequence.new.rst
   trunk/sandbox/rstdiff/tests/simple/input/sectionSequence.old.rst
   trunk/sandbox/rstdiff/tests/simple/source/sectionSequence.rst
   trunk/sandbox/rstdiff/tests/simpleHtml/expected/sectionSequence.html
   trunk/sandbox/rstdiff/version.py
Log:
Renamed option `--compare-sections-by-id` to
`--compare-sections-by-name` and comparison is done by name. This
works for duplicated section titles, too.

Modified: trunk/sandbox/rstdiff/global.log
===================================================================
--- trunk/sandbox/rstdiff/global.log	2011-04-02 10:43:08 UTC (rev 6999)
+++ trunk/sandbox/rstdiff/global.log	2011-04-04 08:39:52 UTC (rev 7000)
 <at>  <at>  -1,4 +1,35  <at>  <at> 
 **************************************
+Date: Mon Apr  4 10:20:51 CEST 2011
+Author: stefan
+Tag: rstdiff_1_115
+
+--------------------------------------
(Continue reading)

smerten | 4 Apr 2011 21:35
Picon

r7001 - in trunk/sandbox/rstdiff: global.log rstdiff.py tag.log tests/simpleHtml/expected/sectionSequence.html version.py

Author: smerten
Date: 2011-04-04 21:35:31 +0200 (Mon, 04 Apr 2011)
New Revision: 7001

Modified:
   trunk/sandbox/rstdiff/global.log
   trunk/sandbox/rstdiff/rstdiff.py
   trunk/sandbox/rstdiff/tag.log
   trunk/sandbox/rstdiff/tests/simpleHtml/expected/sectionSequence.html
   trunk/sandbox/rstdiff/version.py
Log:
Debugging.

Introduced `--dump-rstdiff` since normal `--debug` fails to often with
non-ASCII input documents.

Modified: trunk/sandbox/rstdiff/global.log
===================================================================
--- trunk/sandbox/rstdiff/global.log	2011-04-04 08:39:52 UTC (rev 7000)
+++ trunk/sandbox/rstdiff/global.log	2011-04-04 19:35:31 UTC (rev 7001)
 <at>  <at>  -1,4 +1,49  <at>  <at> 
 **************************************
+Date: Mon Apr  4 21:31:26 CEST 2011
+Author: stefan
+Tag: rstdiff_1_117
+
+--------------------------------------
+Update of /home/stefan/vault/sm/rstdiff
+In directory theowa:/home/stefan/free/rstdiff
+
(Continue reading)

milde | 8 Apr 2011 21:57
Picon

r7002 - in trunk/docutils/test: mini_frontend.py test_command_line.py

Author: milde
Date: 2011-04-08 21:57:44 +0200 (Fri, 08 Apr 2011)
New Revision: 7002

Added:
   trunk/docutils/test/mini_frontend.py
Modified:
   trunk/docutils/test/test_command_line.py
Log:
Let command line test work without installing Docutils

Added: trunk/docutils/test/mini_frontend.py
===================================================================
--- trunk/docutils/test/mini_frontend.py	                        (rev 0)
+++ trunk/docutils/test/mini_frontend.py	2011-04-08 19:57:44 UTC (rev 7002)
 <at>  <at>  -0,0 +1,20  <at>  <at> 
+#!/usr/bin/env python
+# -*- coding: utf8 -*-
+# :Copyright: © 2011 Günter Milde.
+#             Released  without warranties or conditions of any kind
+#             under the terms of the Apache License, Version 2.0
+#             http://www.apache.org/licenses/LICENSE-2.0
+# :Id: $Id$
+
+"""
+A minimal Docutils front-end for testing the command line
+"""
+
+# allow import also if Doctuils is not installed
+import sys, os
(Continue reading)

milde | 8 Apr 2011 22:13
Picon

r7003 - trunk/docutils/docutils/writers/latex2e/__init__.py

Author: milde
Date: 2011-04-08 22:13:30 +0200 (Fri, 08 Apr 2011)
New Revision: 7003

Modified:
   trunk/docutils/docutils/writers/latex2e/__init__.py
Log:
Replace str.format (new in 2.6) with % transformation.

Thanks to Kirill Spitsin for reporting.

Modified: trunk/docutils/docutils/writers/latex2e/__init__.py
===================================================================
--- trunk/docutils/docutils/writers/latex2e/__init__.py	2011-04-08 19:57:44 UTC (rev 7002)
+++ trunk/docutils/docutils/writers/latex2e/__init__.py	2011-04-08 20:13:30 UTC (rev 7003)
 <at>  <at>  -829,7 +829,7  <at>  <at> 
         mc_width = sum(width
                        for width in (self._col_width[start + co - 1]
                                      for co in range (len_)))
-        return '{0:.2f}\\DUtablewidth'.format(mc_width)
+        return '%.2f\\DUtablewidth' % mc_width

     def get_caption(self):
         if not self.caption:

------------------------------------------------------------------------------
Xperia(TM) PLAY
It's a major breakthrough. An authentic gaming
smartphone on the nation's most reliable network.
And it wants your games.
(Continue reading)

smerten | 9 Apr 2011 13:02
Picon

r7004 - in trunk/sandbox/rstdiff: global.log rstdiff.py tag.log tests/html/expected/contents.html tests/html/input/contents.new.rst tests/html/input/contents.old.rst tests/htmlNoSource/ tests/htmlNoSource/expected/ tests/htmlNoSource/expected/contents.html tests/htmlNoSource/expected/generated.html tests/htmlNoSource/filterunit.cfg tests/htmlNoSource/input/ tests/htmlNoSource/input/contents.new.rst tests/htmlNoSource/input/contents.old.rst tests/htmlNoSource/input/generated.new.rst tests/htmlNoSource/input/generated.old.rst version.py

Author: smerten
Date: 2011-04-09 13:02:30 +0200 (Sat, 09 Apr 2011)
New Revision: 7004

Added:
   trunk/sandbox/rstdiff/tests/htmlNoSource/
   trunk/sandbox/rstdiff/tests/htmlNoSource/expected/
   trunk/sandbox/rstdiff/tests/htmlNoSource/expected/contents.html
   trunk/sandbox/rstdiff/tests/htmlNoSource/expected/generated.html
   trunk/sandbox/rstdiff/tests/htmlNoSource/filterunit.cfg
   trunk/sandbox/rstdiff/tests/htmlNoSource/input/
   trunk/sandbox/rstdiff/tests/htmlNoSource/input/contents.new.rst
   trunk/sandbox/rstdiff/tests/htmlNoSource/input/contents.old.rst
   trunk/sandbox/rstdiff/tests/htmlNoSource/input/generated.new.rst
   trunk/sandbox/rstdiff/tests/htmlNoSource/input/generated.old.rst
Removed:
   trunk/sandbox/rstdiff/tests/html/expected/contents.html
   trunk/sandbox/rstdiff/tests/html/input/contents.new.rst
   trunk/sandbox/rstdiff/tests/html/input/contents.old.rst
Modified:
   trunk/sandbox/rstdiff/global.log
   trunk/sandbox/rstdiff/rstdiff.py
   trunk/sandbox/rstdiff/tag.log
   trunk/sandbox/rstdiff/version.py
Log:
`generated` nodes are replaced by `inline` nodes so changed section
numbers are marked up correctly.

Modified: trunk/sandbox/rstdiff/global.log
===================================================================
(Continue reading)

milde | 9 Apr 2011 23:14
Picon

r7005 - in trunk/docutils/test: mini_frontend.py test_command_line.py

Author: milde
Date: 2011-04-09 23:14:53 +0200 (Sat, 09 Apr 2011)
New Revision: 7005

Modified:
   trunk/docutils/test/mini_frontend.py
   trunk/docutils/test/test_command_line.py
Log:
One more fix to the command line test

Modified: trunk/docutils/test/mini_frontend.py
===================================================================
--- trunk/docutils/test/mini_frontend.py	2011-04-09 11:02:30 UTC (rev 7004)
+++ trunk/docutils/test/mini_frontend.py	2011-04-09 21:14:53 UTC (rev 7005)
 <at>  <at>  -14,6 +14,7  <at>  <at> 
 import sys, os
 testroot = os.path.abspath(os.path.dirname(__file__) or os.curdir)
 sys.path.insert(0, os.path.normpath(os.path.join(testroot, '..')))
+sys.path.append(os.path.normpath(os.path.join(testroot, '..', 'extras')))

 from docutils.core import publish_cmdline

Modified: trunk/docutils/test/test_command_line.py
===================================================================
--- trunk/docutils/test/test_command_line.py	2011-04-09 11:02:30 UTC (rev 7004)
+++ trunk/docutils/test/test_command_line.py	2011-04-09 21:14:53 UTC (rev 7005)
 <at>  <at>  -39,9 +39,8  <at>  <at> 
         #     self.assertEqual(sys.argv[0].encoding,
         #                      locale.getpreferredencoding())
         # so instead, we check if a command line with non-ASCII char works
(Continue reading)

milde | 12 Apr 2011 09:16
Picon

r7006 - in trunk/docutils/test: mini_frontend.py test_command_line.py

Author: milde
Date: 2011-04-12 09:16:39 +0200 (Tue, 12 Apr 2011)
New Revision: 7006

Removed:
   trunk/docutils/test/mini_frontend.py
Modified:
   trunk/docutils/test/test_command_line.py
Log:
Simpler and more robust test of command line decoding.

Test `Publisher` class after modifying sys.argv 
instead of testing frontend.

Modified: trunk/docutils/test/test_command_line.py
===================================================================
--- trunk/docutils/test/test_command_line.py	2011-04-09 21:14:53 UTC (rev 7005)
+++ trunk/docutils/test/test_command_line.py	2011-04-12 07:16:39 UTC (rev 7006)
 <at>  <at>  -8,12 +8,10  <at>  <at> 
 Test module for the command line.
 """

-from os.path import normpath, dirname
 import unittest
 import sys
 import DocutilsTestSupport              # must be imported before docutils
 import docutils.core
-import docutils.utils

 try:
(Continue reading)

milde | 12 Apr 2011 11:10
Picon

r7007 - in trunk/docutils: HISTORY.txt docutils/__init__.py docutils/utils.py test/test__init__.py test/test_utils.py

Author: milde
Date: 2011-04-12 11:10:57 +0200 (Tue, 12 Apr 2011)
New Revision: 7007

Added:
   trunk/docutils/test/test__init__.py
Modified:
   trunk/docutils/HISTORY.txt
   trunk/docutils/docutils/__init__.py
   trunk/docutils/docutils/utils.py
   trunk/docutils/test/test_utils.py
Log:
Workaround for unicode messages in Exception instances with Python < 2.6.

Modified: trunk/docutils/HISTORY.txt
===================================================================
--- trunk/docutils/HISTORY.txt	2011-04-12 07:16:39 UTC (rev 7006)
+++ trunk/docutils/HISTORY.txt	2011-04-12 09:10:57 UTC (rev 7007)
 <at>  <at>  -24,9 +24,11  <at>  <at> 
     warn and fall back to English.
   - Math support: reStructuredText "math" role and directive,
     ``math`` and ``math_block`` doctree elements.
-  - Decode command line arguments with the locales preferred encoding
+  - Decode command line arguments with the locale's preferred encoding
     (to allow, e.g., ``--title=Dornröschen``).
   - Orphaned "python" reader and "newlatex2e" writer moved to the sandbox.
+  - Workaround for unicode messages in Exception instances 
+    with Python < 2.6.

 .. _BCP 47: http://www.rfc-editor.org/rfc/bcp/bcp47.txt
(Continue reading)


Gmane