diff options
| author | milde <milde@929543f6-e4f2-0310-98a6-ba3bd3dd1d04> | 2022-03-17 13:40:11 +0000 |
|---|---|---|
| committer | milde <milde@929543f6-e4f2-0310-98a6-ba3bd3dd1d04> | 2022-03-17 13:40:11 +0000 |
| commit | 6ddacc9d64b3cb4d8a63fce877cd7463cc489bae (patch) | |
| tree | 3c772b7f03eb4bb0e1b7b53632e10b1d239a5030 /docutils/test/test_settings.py | |
| parent | 6651bc904c324ae34a168085c71d09deacb1ef0f (diff) | |
| download | docutils-6ddacc9d64b3cb4d8a63fce877cd7463cc489bae.tar.gz | |
Prepare switch from optparse to argparse.
New interface function: frontend.get_default_settings()
easy access to default settings for programmatic use.
Add deprecation warnings.
Catch them when accessing the deprecated functions from Docutils.
Make docstrings conform to the Documentation Policies
(first line: summary, next line empty).
git-svn-id: https://svn.code.sf.net/p/docutils/code/trunk@9047 929543f6-e4f2-0310-98a6-ba3bd3dd1d04
Diffstat (limited to 'docutils/test/test_settings.py')
| -rwxr-xr-x | docutils/test/test_settings.py | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/docutils/test/test_settings.py b/docutils/test/test_settings.py index aed6f770b..94c116564 100755 --- a/docutils/test/test_settings.py +++ b/docutils/test/test_settings.py @@ -108,10 +108,9 @@ class ConfigFileTests(unittest.TestCase): """Comparison method shared by all tests.""" def setUp(self): - warnings.filterwarnings(action='ignore', + warnings.filterwarnings('ignore', category=frontend.ConfigDeprecationWarning) - warnings.filterwarnings(action='ignore', module='docutils.frontend', - category=PendingDeprecationWarning) + warnings.filterwarnings('ignore', category=DeprecationWarning) self.option_parser = frontend.OptionParser( components=(pep_html.Writer, rst.Parser), read_config_files=None) @@ -357,5 +356,6 @@ class HelperFunctionsTests(unittest.TestCase): reporter.set_conditions('foo', 1, 4) # trigger warning + if __name__ == '__main__': unittest.main() |
