Back to index

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

List of all members.

Public Member Functions

def test_failures_when_not_required
def test_failures_when_required
def test_successes_when_not_required
def test_successes_when_required
def test_usage_when_not_required
def test_usage_when_required
def test_help_when_not_required
def test_help_when_required

Public Attributes

_PyObject_HEAD_EXTRA Py_ssize_t ob_refcnt
struct _typeobjectob_type

Detailed Description

Definition at line 2261 of file test_argparse.py.


Member Function Documentation

Definition at line 2263 of file test_argparse.py.

02263 
02264     def test_failures_when_not_required(self):
02265         parse_args = self.get_parser(required=False).parse_args
02266         error = ArgumentParserError
02267         for args_string in self.failures:
02268             self.assertRaises(error, parse_args, args_string.split())

Here is the call graph for this function:

Definition at line 2269 of file test_argparse.py.

02269 
02270     def test_failures_when_required(self):
02271         parse_args = self.get_parser(required=True).parse_args
02272         error = ArgumentParserError
02273         for args_string in self.failures + ['']:
02274             self.assertRaises(error, parse_args, args_string.split())

Here is the call graph for this function:

Definition at line 2298 of file test_argparse.py.

02298 
02299     def test_help_when_not_required(self):
02300         format_help = self.get_parser(required=False).format_help
02301         help = self.usage_when_not_required + self.help
02302         self.assertEqual(format_help(), textwrap.dedent(help))

Here is the call graph for this function:

Definition at line 2303 of file test_argparse.py.

02303 
02304     def test_help_when_required(self):
02305         format_help = self.get_parser(required=True).format_help
02306         help = self.usage_when_required + self.help
02307         self.assertEqual(format_help(), textwrap.dedent(help))
02308 

Here is the call graph for this function:

Definition at line 2275 of file test_argparse.py.

02275 
02276     def test_successes_when_not_required(self):
02277         parse_args = self.get_parser(required=False).parse_args
02278         successes = self.successes + self.successes_when_not_required
02279         for args_string, expected_ns in successes:
02280             actual_ns = parse_args(args_string.split())
02281             self.assertEqual(actual_ns, expected_ns)

Here is the call graph for this function:

Definition at line 2282 of file test_argparse.py.

02282 
02283     def test_successes_when_required(self):
02284         parse_args = self.get_parser(required=True).parse_args
02285         for args_string, expected_ns in self.successes:
02286             actual_ns = parse_args(args_string.split())
02287             self.assertEqual(actual_ns, expected_ns)

Here is the call graph for this function:

Definition at line 2288 of file test_argparse.py.

02288 
02289     def test_usage_when_not_required(self):
02290         format_usage = self.get_parser(required=False).format_usage
02291         expected_usage = self.usage_when_not_required
02292         self.assertEqual(format_usage(), textwrap.dedent(expected_usage))

Here is the call graph for this function:

Definition at line 2293 of file test_argparse.py.

02293 
02294     def test_usage_when_required(self):
02295         format_usage = self.get_parser(required=True).format_usage
02296         expected_usage = self.usage_when_required
02297         self.assertEqual(format_usage(), textwrap.dedent(expected_usage))

Here is the call graph for this function:


Member Data Documentation

Definition at line 107 of file object.h.

struct _typeobject* _object::ob_type [inherited]

Definition at line 108 of file object.h.


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