• Home
  • Raw
  • Download

Lines Matching +full:read +full:- +full:pkg

32         pkg = 'test_getdata_filesys'
34 # Include a LF and a CRLF, to test that binary data is read back
38 package_dir = os.path.join(self.dirname, pkg)
52 # Check we can read the resources
53 res1 = pkgutil.get_data(pkg, 'res.txt')
55 res2 = pkgutil.get_data(pkg, 'sub/res.txt')
58 del sys.modules[pkg]
62 pkg = 'test_getdata_zipfile'
64 # Include a LF and a CRLF, to test that binary data is read back
72 z.writestr(pkg + '/__init__.py', "")
74 z.writestr(pkg + '/res.txt', RESOURCE_DATA)
75 z.writestr(pkg + '/sub/res.txt', RESOURCE_DATA)
78 # Check we can read the resources
80 res1 = pkgutil.get_data(pkg, 'res.txt')
82 res2 = pkgutil.get_data(pkg, 'sub/res.txt')
93 del sys.modules[pkg]
98 pkg = 'test_getdata_zipfile'
100 # Include a LF and a CRLF, to test that binary data is read back
108 z.writestr(pkg + '/__init__.py', "")
110 z.writestr(pkg + '/res.txt', RESOURCE_DATA)
113 # Check we can read the resources
116 res = pkgutil.get_data(pkg, 'res.txt')
124 self.assertEqual(names, [pkg])
127 sys.modules.pop(pkg, None)
135 # issue7367 - walk_packages failed if unreadable dir on sys.path
180 for pkg in expected:
181 if pkg.endswith('mod'):
183 del sys.modules[pkg]
215 for pkg in expected:
216 if pkg.endswith('mod'):
218 del sys.modules[pkg]
306 failure_cases += (uw[:-1], ImportError),
355 # Ensure that get_data works without reloading - the "loads" module
392 # Ensure we read the expected values
471 # Ensure we read the expected values
489 # XXX: test .pkg files
513 self.create_module('a.pkg.__init__', pkgutil_boilerplate)
514 self.create_module('b.pkg.__init__', pkgutil_boilerplate)
515 self.create_module('a.pkg.subpkg.__init__', pkgutil_boilerplate)
516 self.create_module('b.pkg.subpkg.__init__', pkgutil_boilerplate)
517 self.create_module('a.pkg.subpkg.c', 'c = 1')
518 self.create_module('b.pkg.subpkg.d', 'd = 2')
521 import pkg
522 self.addCleanup(unload, 'pkg')
523 self.assertEqual(len(pkg.__path__), 2)
524 import pkg.subpkg
525 self.addCleanup(unload, 'pkg.subpkg')
526 self.assertEqual(len(pkg.subpkg.__path__), 2)
527 from pkg.subpkg.c import c
528 from pkg.subpkg.d import d