HomeSort by relevance Sort by last modified time
    Searched refs:__package__ (Results 1 - 25 of 40) sorted by null

1 2

  /external/python/cpython3/Lib/asyncio/
log.py 7 logger = logging.getLogger(__package__)
  /external/python/cpython3/Lib/test/test_import/data/package2/
submodule1.py 2 sys.modules.pop(__package__, None)
  /external/python/cpython3/Lib/test/test_importlib/import_/
test___package__.py 2 semantics for the __package__ attribute on modules. This attribute is
14 """Use of __package__ supersedes the use of __name__/__path__ to calculate
15 what package a module belongs to. The basic algorithm is [__package__]::
22 But since there is no guarantee that __package__ has been set (or not been
33 __package__ had been set.
47 # [__package__]
48 module = self.import_module({'__package__': 'pkg.fake'})
68 '__name__': 'pkg.fake', '__path__': [], '__package__': None })
72 # If __package__ isn't defined, fall back on __spec__.parent.
77 # Raise an ImportWarning if __package__ != __spec__.parent
    [all...]
  /build/soong/python/tests/testpkg/
par_test.py 32 assert_equal("__package__", __package__, "testpkg")
  /build/soong/python/tests/
par_test.py 34 assert_equal("__package__", __package__, "")
  /external/python/cpython3/Lib/importlib/
util.py 145 """Set __package__ on the returned module.
155 if getattr(module, '__package__', None) is None:
156 module.__package__ = module.__name__
158 module.__package__ = module.__package__.rpartition('.')[0]
187 __package__ is set accordingly (if self.is_package() is defined) will be set
210 module.__package__ = fullname
212 module.__package__ = fullname.rpartition('.')[0]
213 # If __package__ was not set above, __import__() will do it later.
__init__.py 24 _bootstrap.__package__ = 'importlib'
41 _bootstrap_external.__package__ = 'importlib'
_bootstrap.py 541 # __package__
542 if override or getattr(module, '__package__', None) is None:
544 module.__package__ = spec.parent
646 if getattr(module, '__package__', None) is None:
651 module.__package__ = module.__name__
653 module.__package__ = spec.name.rpartition('.')[0]
937 raise TypeError('__package__ not set to a string')
    [all...]
  /external/python/cpython3/Lib/test/test_importlib/
test_util.py 96 self.assertEqual(module.__package__, spec.parent)
173 module.__package__ = 42
180 self.assertEqual(module.__package__, name)
220 # __name__, __loader__, and __package__ should be set (when
237 self.assertEqual(module.__package__, 'pkg')
245 self.assertEqual(module.__package__, name)
258 """Verify the module has the expected value for __package__ after
265 self.assertTrue(hasattr(module, '__package__'))
266 self.assertEqual(expect, module.__package__)
269 # __package__ should be set to the empty string if a top-level module
    [all...]
test_spec.py 318 self.assertEqual(loaded.__package__, self.spec.parent)
372 del loaded.__package__
378 self.assertEqual(loaded.__package__, self.spec.parent)
  /external/autotest/venv/lucifer/
autotest.py 152 mod.__package__ = fullname.rpartition('.')[0]
  /device/linaro/bootloader/edk2/AppPkg/Applications/Python/Python-2.7.2/Lib/test/
test_import.py 417 # Check both OK with __package__ and __name__ correct
418 ns = dict(__package__='test', __name__='test.notarealmodule')
423 ns = dict(__package__='test', __name__='notarealpkg.notarealmodule')
427 # Check relative fails with only __package__ wrong
428 ns = dict(__package__='foo', __name__='test.notarealmodule')
433 # Check relative fails with __package__ and __name__ wrong
434 ns = dict(__package__='foo', __name__='notarealpkg.notarealmodule')
440 ns = dict(__package__=object())
test_importlib.py 85 module.__package__ = package
test_compile.py 447 import __package__.module
452 self.assertIn("__package__", A.f.func_code.co_varnames)
  /external/python/cpython2/Lib/test/
test_import.py 582 # Check both OK with __package__ and __name__ correct
583 ns = dict(__package__='test', __name__='test.notarealmodule')
588 ns = dict(__package__='test', __name__='notarealpkg.notarealmodule')
592 # Check relative fails with only __package__ wrong
593 ns = dict(__package__='foo', __name__='test.notarealmodule')
598 # Check relative fails with __package__ and __name__ wrong
599 ns = dict(__package__='foo', __name__='notarealpkg.notarealmodule')
605 ns = dict(__package__=object())
test_importlib.py 85 module.__package__ = package
test_compile.py 515 import __package__.module
520 self.assertIn("__package__", A.f.func_code.co_varnames)
  /external/chromium-trace/catapult/systrace/systrace/
run_systrace.py 207 if __name__ == '__main__' and __package__ is None:
  /external/python/cpython3/Lib/test/test_import/
__init__.py 694 # Check relative import OK with __package__ and __name__ correct
695 ns = dict(__package__='test', __name__='test.notarealmodule')
699 ns = dict(__package__='test', __name__='notarealpkg.notarealmodule')
702 # Check relative import fails with only __package__ wrong
703 ns = dict(__package__='foo', __name__='test.notarealmodule')
706 # Check relative import fails with __package__ and __name__ wrong
707 ns = dict(__package__='foo', __name__='notarealpkg.notarealmodule')
711 ns = dict(__package__=object())
    [all...]
  /device/linaro/bootloader/edk2/AppPkg/Applications/Python/Python-2.7.10/Lib/
runpy.py 71 __package__ = pkg_name)
147 __package__
  /device/linaro/bootloader/edk2/AppPkg/Applications/Python/Python-2.7.2/Lib/
runpy.py 71 __package__ = pkg_name)
147 __package__
  /external/python/cpython2/Lib/
runpy.py 71 __package__ = pkg_name)
158 __package__
  /external/python/cpython3/Lib/
runpy.py 83 __package__ = pkg_name,
179 __package__
  /external/python/cpython3/Lib/test/
test_module.py 55 self.assertIs(foo.__package__, None)
58 "__loader__": None, "__package__": None,
68 "__loader__": None, "__package__": None,
78 "__loader__": None, "__package__": None,
92 "__loader__": None, "__package__": None, "__spec__": None})
  /external/python/cpython3/Tools/importbench/
importbench.py 45 module.__package__ = ''

Completed in 990 milliseconds

1 2