Back to index

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

Classes

class  TestShutil
class  TestMove
class  TestCopyFile

Functions

def _fake_rename
def mock_rename
def test_main

Variables

 BZ2_SUPPORTED = True
string TESTFN2 = "2"
 UID_GID_SUPPORT = True
 zlib = None
 ZIP_SUPPORT = True

Function Documentation

def test.test_shutil._fake_rename (   args,
  kwargs 
) [private]

Definition at line 52 of file test_shutil.py.

00052 
00053 def _fake_rename(*args, **kwargs):
00054     # Pretend the destination path is on a different filesystem.
00055     raise OSError()

Definition at line 56 of file test_shutil.py.

00056 
00057 def mock_rename(func):
00058     @functools.wraps(func)
00059     def wrap(*args, **kwargs):
00060         try:
00061             builtin_rename = os.rename
00062             os.rename = _fake_rename
00063             return func(*args, **kwargs)
00064         finally:
00065             os.rename = builtin_rename
00066     return wrap

Here is the call graph for this function:

Definition at line 973 of file test_shutil.py.

00973 
00974 def test_main():
00975     support.run_unittest(TestShutil, TestMove, TestCopyFile)


Variable Documentation

Definition at line 28 of file test_shutil.py.

Definition at line 32 of file test_shutil.py.

Definition at line 37 of file test_shutil.py.

Definition at line 48 of file test_shutil.py.

Definition at line 44 of file test_shutil.py.