|
From: <mi...@us...> - 2023-01-17 17:20:14
|
Revision: 9323
http://sourceforge.net/p/docutils/code/9323
Author: milde
Date: 2023-01-17 17:20:12 +0000 (Tue, 17 Jan 2023)
Log Message:
-----------
Fix test case under Windows, add HISTORY entry for last commit.
Thanks to Alan Isaac for test and report.
Modified Paths:
--------------
trunk/docutils/HISTORY.txt
trunk/docutils/test/test_utils.py
Modified: trunk/docutils/HISTORY.txt
===================================================================
--- trunk/docutils/HISTORY.txt 2023-01-17 15:40:43 UTC (rev 9322)
+++ trunk/docutils/HISTORY.txt 2023-01-17 17:20:12 UTC (rev 9323)
@@ -45,6 +45,14 @@
- `Transformer.populate_from_components()` now silently ignores
components that are not instances of `docutils.TransformSpec`.
+* docutils/transforms/frontmatter.py
+
+ - `DocInfo` now accepts author names with initial like "A. Einstein"
+ (that are `parsed as enumerated list`__) in "author" fields
+ instead of rising an error.
+
+ __ docs/ref/rst/restructuredtext.html#enumerated-lists
+
* docutils/transforms/references.py
- Ignore `citation_reference` nodes if the "use_bibex" setting is
Modified: trunk/docutils/test/test_utils.py
===================================================================
--- trunk/docutils/test/test_utils.py 2023-01-17 15:40:43 UTC (rev 9322)
+++ trunk/docutils/test/test_utils.py 2023-01-17 17:20:12 UTC (rev 9323)
@@ -351,15 +351,16 @@
dirs = (os.path.join(TEST_ROOT, 'nonex'),
TEST_ROOT,
os.path.join(TEST_ROOT, '..'))
- found = utils.find_file_in_dirs('HISTORY.txt', dirs)
- self.assertEqual(found, (TEST_ROOT / '..' / 'HISTORY.txt').as_posix())
- # normalize
- found = os.path.relpath(found, TEST_ROOT).replace('\\', '/')
- self.assertTrue(found.startswith('..'),
+ result = utils.find_file_in_dirs('alltests.py', dirs)
+ expected = os.path.join(TEST_ROOT, 'alltests.py').replace('\\', '/')
+ self.assertEqual(result, expected)
+ result = utils.find_file_in_dirs('HISTORY.txt', dirs)
+ expected = (TEST_ROOT / '..' / 'HISTORY.txt').as_posix()
+ self.assertEqual(result, expected)
+ # normalize for second check
+ self.assertTrue(os.path.relpath(result, TEST_ROOT).startswith('..'),
'HISTORY.txt not found in "..".')
# Return `path` if the file exists in the cwd or if there is no match
- self.assertEqual(utils.find_file_in_dirs('alltests.py', dirs),
- os.path.join(TEST_ROOT, 'alltests.py'))
self.assertEqual(utils.find_file_in_dirs('gibts/nicht.txt', dirs),
'gibts/nicht.txt')
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|