Home
last modified time | relevance | path

Searched full:__main__ (Results 1 – 25 of 8403) sorted by relevance

12345678910>>...337

/external/pytorch/test/
Dslow_tests.json2 "test_AllenaiLongformerBase_repro_cpu (__main__.CpuHalideTests)": 211.949,
3 "test_adaptive_max_pool2d1_cpu (__main__.CpuHalideTests)": 111.929,
4 "test_alexnet_prefix_cpu (__main__.CpuHalideTests)": 185.141,
5 …"test_aot_autograd_symbolic_exhaustive_linalg_svd_cpu_float32 (__main__.TestEagerFusionOpInfoCPU)"…
6 …"test_aot_autograd_symbolic_exhaustive_nn_functional_max_pool1d_cpu_float32 (__main__.TestEagerFus…
7 …"test_aot_autograd_symbolic_exhaustive_nn_functional_max_pool2d_cpu_float32 (__main__.TestEagerFus…
8 …"test_aot_autograd_symbolic_exhaustive_nn_functional_max_pool3d_cpu_float32 (__main__.TestEagerFus…
9 …"test_aot_autograd_symbolic_exhaustive_svd_cpu_float32 (__main__.TestEagerFusionOpInfoCPU)": 69.75…
10 …"test_aot_autograd_symbolic_module_exhaustive_nn_TransformerDecoderLayer_cpu_float32 (__main__.Tes…
11 …"test_aot_export_joint_simple_repro_dynamic_shapes (__main__.DynamicShapesAotAutogradFallbackTests…
[all …]
/external/python/cpython3/Doc/library/
D__main__.rst1 :mod:`!__main__` --- Top-level code environment
4 .. module:: __main__
6 interfaces, import-time behavior, and ``__name__ == '__main__'``.
10 In Python, the special name ``__main__`` is used for two important constructs:
13 checked using the ``__name__ == '__main__'`` expression; and
14 2. the ``__main__.py`` file in Python packages.
24 ``__name__ == '__main__'``
43 its ``__name__`` is set to the string ``'__main__'``.
48 ``__main__`` is the name of the environment where top-level code is run.
58 '__main__'
[all …]
Drunpy.rst33 pair: module; __main__
42 module, then that package is imported and the :mod:`__main__` submodule within
59 :const:`None`, to ``mod_name + '.__main__'`` if the named module is a
64 ``mod_name + '.__main__'``, never *run_name*).
85 Added ability to execute packages by looking for a :mod:`__main__` submodule.
104 pair: module; __main__
110 :mod:`__main__` module
111 (e.g. a zipfile containing a top-level :file:`__main__.py` file).
116 function then looks for and executes a :mod:`__main__` module using the
118 an existing ``__main__`` entry located elsewhere on ``sys.path`` if
[all …]
Dzipapp.rst75 Write a ``__main__.py`` file to the archive that executes *mainfn*. The
78 The ``__main__.py`` file will execute that callable.
148 ``__main__.py`` file. The *main* argument should take the form
152 contain a ``__main__.py`` file, as otherwise the resulting archive
270 directory containing a ``__main__.py`` file, and any supporting application
309 to your ``__main__.py`` to include the directory containing the unzipped
318 Python has been able to execute zip files which contain a ``__main__.py`` file
320 simply has to be a standard zip file containing a ``__main__.py`` file which
337 zipfile content *must* include a file called ``__main__.py`` (which must be
/external/python/cpython3/Lib/test/
Dtest_zipapp.py29 (source / '__main__.py').touch()
38 (source / '__main__.py').touch()
47 (source / '__main__.py').touch()
66 (source / '__main__.py').touch()
72 ["__main__.py", "bin/", "bin/baz", "bin/qux", "zed.py"])
81 (source / '__main__.py').touch()
88 self.assertIn('__main__.py', z.namelist())
100 (source / '__main__.py').touch()
109 self.assertIn('__main__.py', z.namelist())
116 (source / '__main__.py').touch()
[all …]
Dtest_multiprocessing_main_handling.py1 # tests __main__ module handling in multiprocessing
33 # multiprocessing includes all sorts of shenanigans to make __main__
37 # the docs to make sure it *does* work from an executed __main__,
45 # We use this __main__ defined function in the map call below in order to
47 # code in child processes and then making it available as __main__
53 # We're inside a package and not in a __main__.py file
57 if __name__ == '__main__':
77 # __main__.py files have an implied "if __name__ == '__main__'" so
80 # This means we can't use __main__ defined functions in child processes,
83 if __name__ != "__main__":
[all …]
Dtest_cmd_line_script.py42 assertEqual(__name__, '__main__')
52 print('__main__ was located through the import system')
67 # XXX: We're not currently making __main__ available under its real name
253 script_name = _make_test_script(script_dir, '__main__')
260 script_name = _make_test_script(script_dir, '__main__')
270 msg = "can't find '__main__' module in %r" % script_dir
275 script_name = _make_test_script(script_dir, '__main__')
282 script_name = _make_test_script(script_dir, '__main__')
292 script_name = _make_test_script(script_dir, '__main__')
302 script_name = _make_test_script(script_dir, '__main__')
[all …]
Dtest_runpy.py26 # real __main__ module (usually test.regrtest)
210 # Package without __main__.py
333 self._make_pkg(example_source, depth, "__main__",
451 result = self._make_pkg("", 1, "__main__")
453 mod_name = mod_name.replace(".__main__", "")
488 pkg_dir, _, mod_name, _ = self._make_pkg("", 1, "__main__")
490 package = mod_name.replace(".__main__", "")
497 # But the warning should occur if we imported the __main__ submodule
535 self._check_relative_imports(depth, "__main__")
688 mod_name = '__main__'
[all …]
/external/python/cpython3/Lib/multiprocessing/
Dspawn.py148 if __name__ == '__main__':
192 main_module = sys.modules['__main__']
251 # __main__.py files for packages, directories, zip archives, etc, run
253 # populate anything in __main__, nor do we make any changes to
254 # __main__ attributes
255 current_main = sys.modules['__main__']
256 if mod_name == "__main__" or mod_name.endswith(".__main__"):
259 # If this process was forked, __main__ may already be populated
263 # Otherwise, __main__ may contain some non-main code where we need to
265 # the normal __main__ an alias to that
[all …]
/external/python/absl-py/absl/testing/tests/
Dxml_reporter_test.py122 r'__main__.MockTest.unexpectedly_passing_test should have failed, '
179 test = MockTest('__main__.MockTest.passing_test')
201 'classname': '__main__.MockTest',
216 test = MockTest('__main__.MockTest.passing_test')
238 'classname': '__main__.MockTest',
253 test = MockTest('__main__.MockTest.passing_test')
277 '__main__.MockTest',
331 test = MockTest('__main__.MockTest.failing_test')
353 'classname': '__main__.MockTest',
368 test = MockTest('__main__.MockTest.failing_test')
[all …]
/external/python/cpython3/Lib/
Drunpy.py144 if mod_name == "__main__" or mod_name.endswith(".__main__"):
145 raise error("Cannot use package as __main__ module")
147 pkg_main_name = mod_name + ".__main__"
174 """Runs the designated module in the __main__ namespace
177 __main__ namespace. If this is not desirable, the run_module()
180 At the very least, these variables in __main__ will be overwritten:
188 if alter_argv or mod_name != "__main__": # i.e. -m switch
195 main_globals = sys.modules["__main__"].__dict__
199 "__main__", mod_spec)
212 otherwise, __name__ will be set to mod_name + '__main__' if the
[all …]
Dzipapp.py12 # The __main__.py used if the users specifies "-m module:fn".
90 INTERPRETER is None), and a __main__.py which runs MAIN (if MAIN is
91 not specified, an existing __main__.py will be used). It is an error
93 __main__.py, and it is an error to omit MAIN if the directory has no
94 __main__.py.
112 has_main = (source / '__main__.py').is_file()
115 "Cannot specify entry point if the source has __main__.py")
144 z.writestr('__main__.py', main_py.encode('utf-8'))
174 "(default: use an existing __main__.py).")
205 if __name__ == '__main__':
Drlcompleter.py4 namespace (which defaults to __main__); when completing NAME.NAME..., it
37 import __main__
49 is __main__ (technically, __main__.__dict__). Namespaces should be
62 # specific namespace or to use __main__.__dict__. This will allow us
63 # to bind to __main__.__dict__ at completion time, not now.
78 self.namespace = __main__.__dict__
DcProfile.py97 import __main__
98 dict = __main__.__dict__
166 code = "run_module(modname, run_name='__main__')"
176 spec = importlib.machinery.ModuleSpec(name='__main__', loader=None,
196 if __name__ == '__main__':
/external/google-cloud-java/owl-bot-postprocessor/synthtool/
D__main__.py38 # A little trickery. If __name__ isn't __main__, import __main__ and return
39 # its extra_args(). This ensures that both `from __main__ import extra_args()`
40 # and `from synthtool.__main__ import extra_args()` works as expected. This
43 if __name__ != "__main__": # pragma: no cover
45 import __main__
47 return __main__.extra_args()
49 # __main__ didn't have an extra_args() attribute, so this means
101 if __name__ == "__main__":
/external/python/pyasn1/tests/codec/
D__main__.py14 ['tests.codec.ber.__main__.suite',
15 'tests.codec.cer.__main__.suite',
16 'tests.codec.der.__main__.suite',
17 'tests.codec.native.__main__.suite']
21 if __name__ == '__main__':
/external/fonttools/Tests/ttLib/
Dmain_test.py6 from fontTools.ttLib import __main__, TTFont, TTCollection
52 __main__.main([str(ttfont_path)])
61 __main__.main(args)
68 __main__.main(["-y", "0", str(ttcollection_path)])
78 __main__.main(args)
90 __main__.main(["-o", str(output_path), str(ttcollection_path)])
99 __main__.main(["-o", str(output_path), str(ttfont_path), str(ttfont_path)])
/external/python/cpython3/Lib/idlelib/idle_test/
Dtest_autocomplete.py8 import __main__
235 if hasattr(__main__, '__file__') and __main__.__file__ != ac.__file__:
245 with patch.dict('__main__.__dict__', {'__all__': ['a', 'b']}):
248 self.assertIn('__name__', b) # From __main__.__dict__.
249 self.assertIn('sum', b) # From __main__.__builtins__.__dict__.
257 with patch.dict('__main__.__dict__', {'foo': mock}):
282 # __main__.__dict__.
293 # Test name from __main__.__dict__.
295 with patch.dict('__main__.__dict__', {'d': di}):
299 with patch.dict('__main__.__dict__', {}):
[all …]
/external/python/pyasn1/tests/
D__main__.py15 'tests.type.__main__.suite',
16 'tests.codec.__main__.suite',
17 'tests.compat.__main__.suite']
21 if __name__ == '__main__':
/external/bazelbuild-rules_python/python/private/
Dcoverage.patch7 diff --git a/coverage/__main__.py b/coverage/__main__.py
9 --- a/coverage/__main__.py
10 +++ b/coverage/__main__.py
/external/pigweed/pw_build/py/
Dcreate_python_tree_test.py142 'planets/mars/__main__.py',
173 'planets/mars/__main__.py',
192 'planets/saturn/__main__.py',
219 'planets/saturn/__main__.py',
286 'planets/mars/__main__.py',
308 'planets/mars/__main__.py',
320 'mars/__main__.py',
338 'planets/saturn/__main__.py',
362 'planets/saturn/__main__.py',
378 'saturn/__main__.py',
[all …]
/external/bazelbuild-rules_python/tests/config_settings/transition/
Dpy_args_tests.bzl43 "main": "__main__.py",
44 "srcs": ["__main__.py"],
54 "main": "__main__.py",
55 "srcs": ["__main__.py"],
/external/pigweed/pw_build_mcuxpresso/py/
DBUILD.bazel38 "pw_build_mcuxpresso/__main__.py",
40 main = "pw_build_mcuxpresso/__main__.py",
50 "pw_build_mcuxpresso/__main__.py",
82 main = "pw_build_mcuxpresso/__main__.py",
/external/bazelbuild-rules_python/gazelle/python/testdata/annotation_include_dep/
DBUILD.out37 srcs = ["__main__.py"],
38 main = "__main__.py",
42 "//checking/py_binary/from/__main__:works",
/external/python/cpython3/Doc/reference/
Dtoplevel_components.rst25 pair: module; __main__
33 functions, exceptions and ``None``) and :mod:`__main__`. The latter is used to
41 pair: module; __main__
47 :mod:`__main__`.

12345678910>>...337