Back to index

python3.2  3.2.2
Classes | Functions | Variables
test.test_zipimport Namespace Reference

Classes

class  UncompressedZipImportTestCase
class  CompressedZipImportTestCase
class  BadFileZipImportTestCase

Functions

def make_pyc
def module_path_to_dotted_name
def test_main

Variables

 zlib = None
string raise_src = 'def do_raise(): raise TypeError\n'
tuple NOW = time.time()
tuple test_pyc = make_pyc(test_co, NOW)
string TESTMOD = "ziptestmodule"
string TESTPACK = "ziptestpackage"
string TESTPACK2 = "ziptestpackage2"
tuple TEMP_ZIP = os.path.abspath("junk95142.zip")
tuple pyc_file = imp.cache_from_source(TESTMOD + '.py')
tuple pyc_ext = ('.pyc' if __debug__ else '.pyo')

Function Documentation

def test.test_zipimport.make_pyc (   co,
  mtime 
)

Definition at line 28 of file test_zipimport.py.

00028 
00029 def make_pyc(co, mtime):
00030     data = marshal.dumps(co)
00031     if type(mtime) is type(0.0):
00032         # Mac mtimes need a bit of special casing
00033         if mtime < 0x7fffffff:
00034             mtime = int(mtime)
00035         else:
00036             mtime = int(-0x100000000 + int(mtime))
00037     pyc = imp.get_magic() + struct.pack("<i", int(mtime)) + data
00038     return pyc

Here is the caller graph for this function:

Definition at line 39 of file test_zipimport.py.

00039 
00040 def module_path_to_dotted_name(path):
00041     return path.replace(os.sep, '.')

Here is the caller graph for this function:

Definition at line 471 of file test_zipimport.py.

00471 
00472 def test_main():
00473     try:
00474         support.run_unittest(
00475               UncompressedZipImportTestCase,
00476               CompressedZipImportTestCase,
00477               BadFileZipImportTestCase,
00478             )
00479     finally:
00480         support.unlink(TESTMOD)


Variable Documentation

tuple test.test_zipimport.NOW = time.time()

Definition at line 42 of file test_zipimport.py.

tuple test.test_zipimport.pyc_ext = ('.pyc' if __debug__ else '.pyo')

Definition at line 52 of file test_zipimport.py.

tuple test.test_zipimport.pyc_file = imp.cache_from_source(TESTMOD + '.py')

Definition at line 51 of file test_zipimport.py.

Definition at line 26 of file test_zipimport.py.

tuple test.test_zipimport.TEMP_ZIP = os.path.abspath("junk95142.zip")

Definition at line 49 of file test_zipimport.py.

Definition at line 43 of file test_zipimport.py.

Definition at line 46 of file test_zipimport.py.

Definition at line 47 of file test_zipimport.py.

Definition at line 48 of file test_zipimport.py.

Definition at line 16 of file test_zipimport.py.