Back to index

python3.2  3.2.2
Public Member Functions | Public Attributes | Static Public Attributes
test.test_argparse.TestFileTypeWB Class Reference
Inheritance diagram for test.test_argparse.TestFileTypeWB:
Inheritance graph
[legend]
Collaboration diagram for test.test_argparse.TestFileTypeWB:
Collaboration graph
[legend]

List of all members.

Public Member Functions

def setUp
def tearDown
def create_readonly_file

Public Attributes

 temp_dir
 old_dir
_PyObject_HEAD_EXTRA Py_ssize_t ob_refcnt
struct _typeobjectob_type

Static Public Attributes

list argument_signatures
list failures = ['-x', '']
list successes

Detailed Description

Definition at line 1525 of file test_argparse.py.


Member Function Documentation

def test.test_argparse.TempDirMixin.create_readonly_file (   self,
  filename 
) [inherited]

Definition at line 51 of file test_argparse.py.

00051 
00052     def create_readonly_file(self, filename):
00053         file_path = os.path.join(self.temp_dir, filename)
00054         with open(file_path, 'w') as file:
00055             file.write(filename)
00056         os.chmod(file_path, stat.S_IREAD)

Here is the caller graph for this function:

def test.test_argparse.TempDirMixin.setUp (   self) [inherited]

Reimplemented in test.test_argparse.TestFileTypeW, test.test_argparse.TestFileTypeRB, test.test_argparse.TestFileTypeR, test.test_argparse.TestArgumentsFromFileConverter, and test.test_argparse.TestArgumentsFromFile.

Definition at line 42 of file test_argparse.py.

00042 
00043     def setUp(self):
00044         self.temp_dir = tempfile.mkdtemp()
00045         self.old_dir = os.getcwd()
00046         os.chdir(self.temp_dir)

Here is the caller graph for this function:

def test.test_argparse.TempDirMixin.tearDown (   self) [inherited]

Definition at line 47 of file test_argparse.py.

00047 
00048     def tearDown(self):
00049         os.chdir(self.old_dir)
00050         shutil.rmtree(self.temp_dir, True)

Here is the call graph for this function:

Here is the caller graph for this function:


Member Data Documentation

Initial value:
[
        Sig('-x', type=argparse.FileType('wb')),
        Sig('spam', type=argparse.FileType('wb')),
    ]

Definition at line 1527 of file test_argparse.py.

Definition at line 1531 of file test_argparse.py.

Definition at line 107 of file object.h.

struct _typeobject* _object::ob_type [inherited]

Definition at line 108 of file object.h.

Definition at line 44 of file test_argparse.py.

Initial value:
[
        ('foo', NS(x=None, spam=WFile('foo'))),
        ('-x foo bar', NS(x=WFile('foo'), spam=WFile('bar'))),
        ('bar -x foo', NS(x=WFile('foo'), spam=WFile('bar'))),
        ('-x - -', NS(x=sys.stdout, spam=sys.stdout)),
    ]

Definition at line 1532 of file test_argparse.py.

Definition at line 43 of file test_argparse.py.


The documentation for this class was generated from the following file: