| /third_party/python/Lib/test/support/ |
| D | warnings_helper.py | 6 import warnings 11 with warnings.catch_warnings(): 12 warnings.simplefilter('ignore', category=DeprecationWarning) 20 with warnings.catch_warnings(record=True) as warns: 21 warnings.simplefilter('always', SyntaxWarning) 38 with warnings.catch_warnings(record=True) as warns: 39 warnings.simplefilter('error', SyntaxWarning) 42 # No warnings are leaked when a SyntaxError is raised. 47 """Decorator to suppress warnings. 49 Use of context managers to hide warnings make diffs [all …]
|
| /third_party/python/Lib/unittest/test/ |
| D | _test_warnings.py | 4 This module has a number of tests that raise different kinds of warnings. 5 When the tests are run, the warnings are caught and their messages are printed 7 unittest.main to affect the behavior of warnings. 9 combinations of warnings args and -W flags and check that the output is correct. 15 import warnings 18 warnings.warn('rw', RuntimeWarning) 21 # unittest warnings will be printed at most once per type (max one message 36 # these warnings are normally silenced, but they are printed in unittest 38 warnings.warn('dw', DeprecationWarning) 39 warnings.warn('dw', DeprecationWarning) [all …]
|
| /third_party/python/Doc/library/ |
| D | warnings.rst | 1 :mod:`warnings` --- Warning control 4 .. module:: warnings 7 **Source code:** :source:`Lib/warnings.py` 9 .. index:: single: warnings 18 Python programmers issue warnings by calling the :func:`warn` function defined 23 can be changed flexibly, from ignoring all warnings to turning them into 24 exceptions. The disposition of warnings can vary based on the :ref:`warning category 44 :func:`logging.captureWarnings` allows you to handle all warnings with 54 This categorization is useful to be able to filter out groups of warnings. 58 documented here, because conceptually they belong to the warnings mechanism. [all …]
|
| /third_party/python/Tools/scripts/ |
| D | fixdiv.py | 5 To use this tool, first run `python -Qwarnall yourscript.py 2>warnings'. 8 `warnings'. The warnings look like this: 12 The warnings are written to stderr, so you must use `2>' for the I/O 17 The warnings are not limited to the script; modules imported by the 18 script may also trigger warnings. In fact a useful technique is to 22 Then run `python fixdiv.py warnings'. This first reads the warnings, 23 looking for classic division warnings, and sorts them by file name and 25 it parses the file and tries to match the warnings up to the division 58 A / operator was found for which no warnings were seen. This could 68 - 'Phantom ... warnings for line N', line marked by '*': [all …]
|
| /third_party/python/Lib/test/test_importlib/import_/ |
| D | test___package__.py | 8 import warnings 53 with warnings.catch_warnings(): 54 warnings.simplefilter("ignore") 65 with warnings.catch_warnings(): 66 warnings.simplefilter("ignore") 102 with warnings.catch_warnings(): 103 warnings.simplefilter("ignore", ImportWarning) 107 with warnings.catch_warnings(): 108 warnings.simplefilter("ignore", ImportWarning) 169 with warnings.catch_warnings(): [all …]
|
| D | test_api.py | 7 import warnings 105 with warnings.catch_warnings(): 106 warnings.simplefilter("ignore", ImportWarning) 110 with warnings.catch_warnings(): 111 warnings.simplefilter("ignore", ImportWarning) 115 with warnings.catch_warnings(): 116 warnings.simplefilter("ignore", ImportWarning) 120 with warnings.catch_warnings(): 121 warnings.simplefilter("ignore", ImportWarning) 125 with warnings.catch_warnings(): [all …]
|
| D | test_path.py | 11 import warnings 77 with warnings.catch_warnings(record=True) as w: 78 warnings.simplefilter('always', ImportWarning) 79 warnings.simplefilter('ignore', DeprecationWarning) 127 with warnings.catch_warnings(): 128 warnings.simplefilter("ignore", ImportWarning) 134 with warnings.catch_warnings(): 135 warnings.simplefilter("ignore", ImportWarning) 147 with warnings.catch_warnings(): 148 warnings.simplefilter("ignore", ImportWarning) [all …]
|
| D | test_caching.py | 6 import warnings 67 with warnings.catch_warnings(): 68 warnings.simplefilter("ignore", ImportWarning) 77 with warnings.catch_warnings(): 78 warnings.simplefilter("ignore", ImportWarning) 89 with warnings.catch_warnings(): 90 warnings.simplefilter("ignore", ImportWarning)
|
| D | test_meta_path.py | 6 import warnings 41 with warnings.catch_warnings(record=True) as w: 42 warnings.simplefilter('always') 106 with warnings.catch_warnings(): 107 warnings.simplefilter("ignore", ImportWarning) 111 with warnings.catch_warnings(): 112 warnings.simplefilter("ignore", ImportWarning)
|
| D | test___loader__.py | 5 import warnings 49 with warnings.catch_warnings(): 50 warnings.simplefilter("ignore", ImportWarning) 63 with warnings.catch_warnings(): 64 warnings.simplefilter("ignore", ImportWarning)
|
| /third_party/python/Lib/idlelib/idle_test/ |
| D | test_warning.py | 1 '''Test warnings replacement in pyshell.py and run.py. 6 Make sure warnings module is left unaltered (http://bugs.python.org/issue18081). 12 import warnings 15 showwarning = warnings.showwarning 23 Warning (from warnings module): 35 self.assertIs(warnings.showwarning, showwarning) 37 self.assertIs(warnings.showwarning, run.idle_showwarning_subproc) 39 self.assertIs(warnings.showwarning, showwarning) 53 self.assertIs(warnings.showwarning, showwarning) 55 self.assertIs(warnings.showwarning, shell.idle_showwarning) [all …]
|
| /third_party/python/Lib/test/test_warnings/ |
| D | __init__.py | 17 import warnings as original_warnings 20 py_warnings = import_helper.import_fresh_module('warnings', 22 c_warnings = import_helper.import_fresh_module('warnings', 29 """Use a specific warnings implementation in warning_tests.""" 40 original_warnings = warning_tests.warnings 45 warning_tests.warnings = module 48 warning_tests.warnings = original_warnings 61 self.old_unittest_module = unittest.case.warnings 70 # The 'warnings' module must be explicitly set so that the proper 71 # interaction between _warnings and 'warnings' can be controlled. [all …]
|
| /third_party/python/Lib/unittest/ |
| D | main.py | 6 import warnings 63 failfast = catchbreak = buffer = progName = warnings = testNamePatterns = None 69 buffer=None, warnings=None, *, tb_locals=False): argument 85 if warnings is None and not sys.warnoptions: 87 # print them anyway unless other warnings settings are 88 # specified by the warnings arg or the -W python flag 89 self.warnings = 'default' 91 # here self.warnings is set either to the value passed 92 # to the warnings args or to None. 93 # If the user didn't pass a value self.warnings will [all …]
|
| D | runner.py | 5 import warnings 170 failfast=False, buffer=False, resultclass=None, warnings=None, argument 185 self.warnings = warnings 199 with warnings.catch_warnings(): 200 if self.warnings: 201 # if self.warnings is set, use it to filter all the warnings 202 warnings.simplefilter(self.warnings) 204 # warnings from the deprecated unittest methods to show them 207 # only when self.warnings is None. 208 if self.warnings in ['default', 'always']: [all …]
|
| /third_party/python/Lib/test/libregrtest/ |
| D | save_env.py | 55 'warnings.filters', 'asyncore.socket_map', 62 'files', 'locale', 'warnings.showwarning', 156 warnings = self.try_get_module('warnings') 157 return id(warnings.filters), warnings.filters, warnings.filters[:] 159 warnings = self.get_module('warnings') 160 warnings.filters = saved_filters[1] 161 warnings.filters[:] = saved_filters[2] 285 warnings = self.try_get_module('warnings') 286 return warnings.showwarning 288 warnings = self.get_module('warnings') [all …]
|
| /third_party/curl/docs/ |
| D | CHECKSRC.md | 23 `-h` shows the help output, that also lists all recognized warnings 35 Lists how to use the script and it lists all existing warnings it has and 37 warnings are: 51 **Ignore certain warnings** section below for details. 131 ### Extended warnings 133 Some warnings are quite computationally expensive to perform, so they are 134 turned off by default. To enable these warnings, place a `.checksrc` file in 136 warnings you are interested in. The format of the file is to enable one 139 Currently these are the extended warnings which can be enabled: 148 ## Ignore certain warnings [all …]
|
| /third_party/python/Lib/test/ |
| D | test_string_literals.py | 35 import warnings 115 with warnings.catch_warnings(record=True) as w: 116 warnings.simplefilter('always', category=DeprecationWarning) 123 with warnings.catch_warnings(record=True) as w: 124 warnings.simplefilter('error', category=DeprecationWarning) 139 with warnings.catch_warnings(record=True) as w: 140 warnings.simplefilter('always', category=DeprecationWarning) 148 with warnings.catch_warnings(record=True) as w: 149 warnings.simplefilter('error', category=DeprecationWarning) 192 with warnings.catch_warnings(record=True) as w: [all …]
|
| D | test_global.py | 1 """Verify that warnings are issued for global statements following use.""" 6 import warnings 13 warnings.filterwarnings("error", module="<test string>") 52 unittest.enterModuleContext(warnings.catch_warnings()) 53 warnings.filterwarnings("error", module="<test string>")
|
| /third_party/typescript/tests/cases/fourslash/ |
| D | jsFileJsdocTypedefTagTypeExpressionCompletion.ts | 31 function warnings(entries: ReadonlyArray<FourSlashInterface.ExpectedCompletionEntryObject>): Readon… function 40 ...warnings(values), 41 ...warnings(typeMembers), 48 ...warnings(types), 49 ...warnings(typeMembers), 56 ...warnings(types), 57 ...warnings(values),
|
| D | jsFileJsdocTypedefTagTypeExpressionCompletion3.ts | 33 const warnings = (names: ReadonlyArray<string>): ReadonlyArray<FourSlashInterface.ExpectedCompletio… constant 41 …...warnings(["Namespace", "SomeType", "x", "x1", "method1", "property1", "method3", "method4", "fo… 48 …...warnings(["Foo", "value", "property1", "method1", "method3", "method4", "foo", "age", "SomeType… 55 …...warnings(["Foo", "value", "property1", "method1", "method3", "method4", "foo", "age", "Namespac… 64 … ...warnings(["Namespace", "SomeType", "method1", "property1", "method3", "method4", "foo"]), 71 …...warnings(["Foo", "value", "property1", "method1", "method3", "method4", "foo", "Namespace", "So… 80 … ...warnings(["Foo", "value", "method1", "foo", "age", "Namespace", "SomeType", "x", "x1"]), 89 …...warnings(["Foo", "value", "property1", "method3", "method4", "foo", "age", "Namespace", "SomeTy…
|
| /third_party/openssl/external/perl/Text-Template-1.56/t/ |
| D | warnings.t | 4 use warnings; 16 unless (eval { require Test::Warnings; 1; }) { 17 plan(skip_all => '[ Test::Warnings ] is required for testing'); 20 Test::Warnings->import; 26 'This template should not produce warnings.'.$bad; 37 is $result, 'This template should not produce warnings.';
|
| /third_party/python/Lib/ |
| D | warnings.py | 1 """Python part of the warnings subsystem.""" 26 # warnings get lost 104 # warnings.showwarning() was replaced 106 raise TypeError("warnings.showwarning() must be set to a " 125 # warnings.formatwarning() was replaced 132 """Insert an entry into the list of warnings filters (at the front). 139 'lineno' -- an integer line number, 0 matches all warnings 166 """Insert a simple entry into the list of warnings filters (at the front). 172 'lineno' -- an integer line number, 0 matches all warnings 391 "Unrecognized action (%r) in warnings.filters:\n %s" % [all …]
|
| /third_party/python/Lib/test/test_importlib/source/ |
| D | test_file_loader.py | 17 import warnings 44 with warnings.catch_warnings(): 45 warnings.simplefilter('ignore', DeprecationWarning) 77 with warnings.catch_warnings(): 78 warnings.simplefilter('ignore', DeprecationWarning) 90 with warnings.catch_warnings(): 91 warnings.simplefilter('ignore', DeprecationWarning) 105 with warnings.catch_warnings(): 106 warnings.simplefilter('ignore', DeprecationWarning) 121 with warnings.catch_warnings(): [all …]
|
| /third_party/rust/crates/io-lifetimes/.github/workflows/ |
| D | main.yml | 37 # -D warnings is commented out in our install-rust action; re-add it here. 38 RUSTFLAGS: -D warnings 65 # -D warnings is commented out in our install-rust action; re-add it here. 66 RUSTFLAGS: -D warnings 94 # -D warnings is commented out in our install-rust action; re-add it here. 95 RUSTFLAGS: -D warnings 119 # -D warnings is commented out in our install-rust action; re-add it here. 120 RUSTFLAGS: -D warnings
|
| /third_party/openssl/util/ |
| D | mknum.pl | 11 use warnings; 24 my $warnings = 1; 34 'warnings!' => \$warnings, 43 warnings => $warnings, 61 warnings => $warnings,
|