diff options
author | milde <milde@929543f6-e4f2-0310-98a6-ba3bd3dd1d04> | 2023-01-17 17:20:12 +0000 |
---|---|---|
committer | milde <milde@929543f6-e4f2-0310-98a6-ba3bd3dd1d04> | 2023-01-17 17:20:12 +0000 |
commit | db4031b247646f29c744859540c23f7bb097510d (patch) | |
tree | 6ed9700c4a8bcf39df3e2c485156d53fe0056692 | |
parent | f88c02212ed484500c451fd30e58d000f777bfac (diff) | |
download | docutils-db4031b247646f29c744859540c23f7bb097510d.tar.gz |
Fix test case under Windows, add HISTORY entry for last commit.
Thanks to Alan Isaac for test and report.
git-svn-id: https://svn.code.sf.net/p/docutils/code/trunk@9323 929543f6-e4f2-0310-98a6-ba3bd3dd1d04
-rw-r--r-- | docutils/HISTORY.txt | 8 | ||||
-rwxr-xr-x | docutils/test/test_utils.py | 15 |
2 files changed, 16 insertions, 7 deletions
diff --git a/docutils/HISTORY.txt b/docutils/HISTORY.txt index fdb6cda15..558fd3a41 100644 --- a/docutils/HISTORY.txt +++ b/docutils/HISTORY.txt @@ -45,6 +45,14 @@ Changes Since 0.19 - `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 diff --git a/docutils/test/test_utils.py b/docutils/test/test_utils.py index 70d5316fd..c7a44f78e 100755 --- a/docutils/test/test_utils.py +++ b/docutils/test/test_utils.py @@ -351,15 +351,16 @@ class HelperFunctionTests(unittest.TestCase): 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') |