diff options
author | Prince Roshan <princekrroshan01@gmail.com> | 2023-05-20 22:26:49 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-05-20 22:26:49 (GMT) |
commit | 12f1581b0c43f40a792c188e17d2dea2357debb3 (patch) | |
tree | 8fe49fd21b2b75f5fce951216c25ad42fafebd18 /Lib/test/test_logging.py | |
parent | 27a68be77f7a5bfb7c4b97438571b4fcf5aae8b4 (diff) | |
download | cpython-12f1581b0c43f40a792c188e17d2dea2357debb3.zip cpython-12f1581b0c43f40a792c188e17d2dea2357debb3.tar.gz cpython-12f1581b0c43f40a792c188e17d2dea2357debb3.tar.bz2 |
gh-103606: raise RuntimeError if config file is invalid or empty (#104701)
(this adjusts new code) raise RuntimeError if provided config file is invalid or empty, not ValueError.
Diffstat (limited to 'Lib/test/test_logging.py')
-rw-r--r-- | Lib/test/test_logging.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/Lib/test/test_logging.py b/Lib/test/test_logging.py index ba836a7..18258c2 100644 --- a/Lib/test/test_logging.py +++ b/Lib/test/test_logging.py @@ -1781,12 +1781,12 @@ class ConfigFileTest(BaseTest): """ file = io.StringIO(textwrap.dedent(test_config)) - self.assertRaises(ValueError, logging.config.fileConfig, file) + self.assertRaises(RuntimeError, logging.config.fileConfig, file) def test_exception_if_confg_file_is_empty(self): fd, fn = tempfile.mkstemp(prefix='test_empty_', suffix='.ini') os.close(fd) - self.assertRaises(ValueError, logging.config.fileConfig, fn) + self.assertRaises(RuntimeError, logging.config.fileConfig, fn) os.remove(fn) def test_exception_if_config_file_does_not_exist(self): |