Home
last modified time | relevance | path

Searched refs:warnings (Results 1 - 25 of 332) sorted by relevance

12345678910>>...14

/third_party/python/Lib/unittest/test/
H A 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 namespace
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
[all...]
/third_party/python/Lib/test/support/
H A Dwarnings_helper.py6 import warnings namespace
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 mak
78 def warnings(self): global() member in WarningsRecorder
[all...]
/third_party/python/Lib/test/test_importlib/import_/
H A Dtest___package__.py8 import warnings namespace
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
[all...]
H A Dtest_api.py7 import warnings namespace
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
[all...]
H A Dtest_path.py11 import warnings namespace
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
[all...]
H A Dtest_caching.py6 import warnings namespace
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)
H A Dtest_meta_path.py6 import warnings namespace
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)
H A Dtest___loader__.py5 import warnings namespace
49 with warnings.catch_warnings():
50 warnings.simplefilter("ignore", ImportWarning)
63 with warnings.catch_warnings():
64 warnings.simplefilter("ignore", ImportWarning)
/third_party/python/Tools/scripts/
H A 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 u
[all...]
/third_party/python/Lib/idlelib/idle_test/
H A 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 namespace
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
[all...]
/third_party/python/Lib/test/
H A Dtest_codeop.py7 import warnings namespace
317 self.assertEqual(len(w.warnings), 2)
320 with warnings.catch_warnings(), self.assertRaises(SyntaxError):
321 warnings.simplefilter('error', SyntaxWarning)
325 with warnings.catch_warnings(), self.assertRaises(SyntaxError):
326 warnings.simplefilter('error', DeprecationWarning)
330 with warnings.catch_warnings(record=True) as w:
331 warnings.simplefilter('always')
336 with warnings.catch_warnings(record=True) as w:
337 warnings
[all...]
H A Dtest_string_literals.py35 import warnings namespace
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
[all...]
H A Dtest_global.py1 """Verify that warnings are issued for global statements following use."""
6 import warnings namespace
13 warnings.filterwarnings("error", module="<test string>")
52 unittest.enterModuleContext(warnings.catch_warnings())
53 warnings.filterwarnings("error", module="<test string>")
H A Dtest_support.py14 import warnings namespace
29 orig_filter_len = len(warnings.filters)
36 assert len(warnings.filters) == orig_filter_len + 2
40 orig_filter_len = len(warnings.filters)
45 assert len(warnings.filters) == orig_filter_len - 2
48 """Test support.ignore_deprecations_from() silences warnings"""
49 with warnings.catch_warnings(record=True) as warning_objs:
51 warnings.warn("You should NOT be seeing this.", DeprecationWarning)
192 warnings = [str(w.message) for w in recorder.warnings]
[all...]
/third_party/python/Lib/unittest/
H A Dmain.py6 import warnings namespace
63 failfast = catchbreak = buffer = progName = warnings = testNamePatterns = None
69 buffer=None, warnings=None, *, tb_locals=False):
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 wil
[all...]
H A Drunner.py5 import warnings namespace
170 failfast=False, buffer=False, resultclass=None, warnings=None,
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)
[all...]
/third_party/python/Lib/test/libregrtest/
H A 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
[all...]
/third_party/python/Lib/test/test_importlib/builtin/
H A Dtest_finder.py7 import warnings namespace
54 with warnings.catch_warnings():
55 warnings.simplefilter("ignore", DeprecationWarning)
68 with warnings.catch_warnings():
69 warnings.simplefilter("ignore", DeprecationWarning)
/third_party/python/Lib/
H A Daifc.py139 import warnings namespace
144 warnings._deprecated(__name__, remove=(3, 13))
258 with warnings.catch_warnings():
259 warnings.simplefilter("ignore", DeprecationWarning)
456 with warnings.catch_warnings():
457 warnings.simplefilter('ignore', category=DeprecationWarning)
462 with warnings.catch_warnings():
463 warnings.simplefilter('ignore', category=DeprecationWarning)
468 with warnings.catch_warnings():
469 warnings
[all...]
/third_party/python/Lib/distutils/tests/
H A Dtest_extension.py4 import warnings namespace
59 warnings.simplefilter('always')
62 self.assertEqual(len(w.warnings), 1)
63 self.assertEqual(str(w.warnings[0].message),
/third_party/python/Lib/test/test_importlib/
H A Dtest_windows.py8 import warnings namespace
98 with warnings.catch_warnings():
99 warnings.simplefilter("ignore", DeprecationWarning)
105 with warnings.catch_warnings():
106 warnings.simplefilter("ignore", DeprecationWarning)
114 with warnings.catch_warnings():
115 warnings.simplefilter("ignore", DeprecationWarning)
H A Dtest_api.py14 import warnings namespace
114 with warnings.catch_warnings():
115 warnings.simplefilter('ignore', DeprecationWarning)
127 with warnings.catch_warnings():
128 warnings.simplefilter('ignore', DeprecationWarning)
143 with warnings.catch_warnings():
144 warnings.simplefilter('ignore', DeprecationWarning)
152 with warnings.catch_warnings():
153 warnings.simplefilter('ignore', DeprecationWarning)
154 warnings
[all...]
/third_party/PyYAML/lib/_yaml/
H A D__init__.py17 import warnings namespace
18 warnings.warn(
25 del warnings
/third_party/python/Lib/lib2to3/tests/
H A D__init__.py4 import warnings namespace
9 with warnings.catch_warnings():
10 warnings.filterwarnings('ignore', category=DeprecationWarning, message='lib2to3')
/third_party/python/Lib/test/test_importlib/source/
H A Dtest_file_loader.py17 import warnings namespace
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
[all...]

Completed in 11 milliseconds

12345678910>>...14