From: Adam T. <aat...@ou...> - 2022-02-24 01:28:50
|
Tests have been failing since r9010; the attached patch fixes one failure on Windows. The remaining two failures are because "docutils/test/data/config_syntax_error.txt" does not exist. I could a syntax error causing file if need be, I suspect more likely is it just wasn't committed accidentally. A ------------- >From 5afac77c70f72f4645962d4dc0a49d088e8488cd Mon Sep 17 00:00:00 2001 From: Adam Turner <908...@us...> Date: Thu, 24 Feb 2022 01:22:23 +0000 Subject: [PATCH] Fix tests --- docutils/test/test_settings.py | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/docutils/test/test_settings.py b/docutils/test/test_settings.py index 83213757e..c8cbbdd74 100755 --- a/docutils/test/test_settings.py +++ b/docutils/test/test_settings.py @@ -151,14 +151,14 @@ class ConfigFileTests(unittest.TestCase): def test_old(self): with self.assertWarnsRegex(FutureWarning, - 'The "\[option\]" section is deprecated.'): + r'The "\[option\]" section is deprecated.'): self.files_settings('old') def test_syntax_error(self): with self.assertRaisesRegex( ValueError, 'Error in config file ".*config_syntax_error.txt", ' - 'section "\[general\]"'): + r'section "\[general\]"'): self.files_settings('syntax_error') def test_one(self): @@ -225,7 +225,9 @@ class ConfigEnvVarFileTests(ConfigFileTests): def test_old(self): pass # don't repreat this test - @unittest.skipUnless(os.name, 'posix') + @unittest.skipUnless( + os.name == 'posix', + 'os.path.expanduser() no longer uses HOME on Windows (since 3.8)') def test_get_standard_config_files(self): os.environ['HOME'] = '/home/parrot' # os.path.expanduser() no longer uses HOME on Windows (since 3.8) -- 2.30.0.windows.2 |