Home
last modified time | relevance | path

Searched full:warnings (Results 1 – 25 of 2662) sorted by relevance

12345678910>>...107

/third_party/python/Lib/test/support/
Dwarnings_helper.py6 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.py4 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/
Dwarnings.rst1 :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/node/deps/npm/node_modules/validate-npm-package-name/lib/
Dindex.js11 var warnings = []
16 return done(warnings, errors)
21 return done(warnings, errors)
26 return done(warnings, errors)
52 // Generate warnings for stuff that used to be allowed
57 warnings.push(builtin + ' is a core module name')
62 warnings.push('name can no longer contain more than 214 characters')
67 warnings.push('name can no longer contain capital letters')
71 warnings.push('name can no longer contain special characters ("~\'!()*")')
81 return done(warnings, errors)
[all …]
/third_party/python/Tools/scripts/
Dfixdiv.py5 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/node/test/parallel/
Dtest-trace-exit.js33 for (const { execArgv, variant, warnings } of [ field
34 { execArgv: ['--trace-exit'], variant: 'main-thread-exit', warnings: 1 }, property
35 { execArgv: [], variant: 'main-thread-exit', warnings: 0 }, property
36 { execArgv: ['--trace-exit'], variant: 'main-thread', warnings: 0 }, property
37 { execArgv: [], variant: 'main-thread', warnings: 0 }, property
38 { execArgv: ['--trace-exit'], variant: 'worker-thread-exit', warnings: 1 }, property
39 { execArgv: [], variant: 'worker-thread-exit', warnings: 0 }, property
40 { execArgv: ['--trace-exit'], variant: 'worker-thread', warnings: 0 }, property
41 { execArgv: [], variant: 'worker-thread', warnings: 0 }, property
48 if (warnings === 0) {
[all …]
Dtest-sync-io-option.js9 // turn, and no warnings should occur when it is disabled or synchronous I/O
23 for (const { execArgv, variant, warnings } of [ field
24 { execArgv: ['--trace-sync-io'], variant: 'late-sync-io', warnings: 1 }, property
25 { execArgv: [], variant: 'late-sync-io', warnings: 0 }, property
26 { execArgv: ['--trace-sync-io'], variant: 'early-sync-io', warnings: 0 }, property
27 { execArgv: [], variant: 'early-sync-io', warnings: 0 }, property
34 if (warnings === 0)
37 assert.strictEqual(actualWarnings.length, warnings);
Dtest-snapshot-warning.js22 console.log('\n# Check snapshot scripts that do not emit warnings.');
60 'warnings and --trace-warnings hint.');
79 match = child.stderr.toString().match(/Use `node --trace-warnings/g);
95 // Warnings should not be handled more than once.
98 match = child.stderr.toString().match(/Use `node --trace-warnings/g);
104 console.log('\n# Check --redirect-warnings');
105 const warningFile1 = path.join(tmpdir.path, 'warnings.txt');
111 '--redirect-warnings',
130 match = warnings1.match(/Use `node --trace-warnings/g);
140 '--redirect-warnings',
[all …]
Dtest-cli-options-negation.js6 // --warnings is on by default.
9 // --warnings can be passed alone.
10 assertHasWarning(spawnWithFlags(['--warnings']));
12 // --no-warnings can be passed alone.
13 assertHasNoWarning(spawnWithFlags(['--no-warnings']));
16 assertHasWarning(spawnWithFlags(['--no-warnings', '--warnings']));
/third_party/python/Lib/test/test_importlib/import_/
Dtest___package__.py8 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 …]
Dtest_api.py7 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 …]
Dtest_path.py11 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 …]
/third_party/python/Lib/idlelib/idle_test/
Dtest_warning.py1 '''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/node/deps/cares/cmake/
DEnableWarnings.cmake10 # remove_warnings(... list of warnings ...)
11 # Turn off given list of individual warnings for all targets and subdirectories added after this.
14 # Remove all warning flags, add -w to suppress built-in warnings.
17 # Suppress warnings for the given targets only.
42 # internal helper: _int_enable_warnings_set_flags_ex(langs_var configs_var [warnings flags])
100 # internal helper: _int_enable_warnings_set_flags(langs_var [warnings flags])
112 …# Visual Studio uses a completely different nomenclature for warnings than gcc/mingw/clang, so non…
113 # "-W[name]" warnings will work.
115 # W4 would be better but it produces unnecessary warnings like:
123 … an error. https://docs.microsoft.com/en-us/cpp/error-messages/compiler-warnings/compiler-warning-…
[all …]
/third_party/python/Lib/test/test_warnings/
D__init__.py17 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/
Dmain.py6 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 …]
Drunner.py5 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/
Dsave_env.py55 '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/node/test/es-module/
Dtest-esm-loader-hooks.mjs10 '--no-warnings',
31 '--no-warnings',
56 '--no-warnings',
70 '--no-warnings',
85 '--no-warnings',
99 '--no-warnings',
115 '--no-warnings',
130 '--no-warnings',
144 '--no-warnings',
159 '--no-warnings',
[all …]
Dtest-esm-loader-spawn-promisified.mjs10 '--no-warnings',
26 '--no-warnings',
42 '--no-warnings',
58 '--no-warnings',
73 '--no-warnings',
89 '--no-warnings',
105 '--no-warnings',
121 '--no-warnings',
137 '--no-warnings',
167 '--no-warnings',
[all …]
/third_party/python/Lib/test/
Dtest_string_literals.py35 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 …]
/third_party/curl/docs/
DCHECKSRC.md17 `-h` shows the help output, that also lists all recognized warnings
29 Lists how to use the script and it lists all existing warnings it has and
31 warnings are:
45 **Ignore certain warnings** section below for details.
125 ### Extended warnings
127 Some warnings are quite computationally expensive to perform, so they are
128 turned off by default. To enable these warnings, place a `.checksrc` file in
130 warnings you are interested in. The format of the file is to enable one
133 Currently these are the extended warnings which can be enabled:
142 ## Ignore certain warnings
[all …]
/third_party/typescript/tests/cases/fourslash/
DjsFileJsdocTypedefTagTypeExpressionCompletion3.ts33 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…
DjsFileJsdocTypedefTagTypeExpressionCompletion.ts31 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),
/third_party/node/test/sequential/
Dtest-process-warnings.js7 const warnmod = require.resolve(fixtures.path('warnings.js'));
11 const noWarn = ['--no-warnings', warnmod];
12 const traceWarn = ['--trace-warnings', warnmod];
17 // Show Process Warnings
24 // Hide Process Warnings
35 assert.match(stderr, /at Object\.<anonymous>\s\(.+warnings\.js:3:9\)/);

12345678910>>...107