Back to index

python3.2  3.2.2
Public Member Functions | Static Public Attributes
test.test_cfgparser.Issue7005TestCase Class Reference
Collaboration diagram for test.test_cfgparser.Issue7005TestCase:
Collaboration graph

List of all members.

Public Member Functions

def prepare
def test_none_as_value_stringified
def test_none_as_value_stringified_raw

Static Public Attributes

string expected_output = "[section]\noption = None\n\n"

Detailed Description

Test output when None is set() as a value and allow_no_value == False.

Definition at line 1247 of file

Member Function Documentation

def test.test_cfgparser.Issue7005TestCase.prepare (   self,

Definition at line 1256 of file

01257     def prepare(self, config_class):
01258         # This is the default, but that's the point.
01259         cp = config_class(allow_no_value=False)
01260         cp.add_section("section")
01261         cp.set("section", "option", None)
01262         sio = io.StringIO()
01263         cp.write(sio)
01264         return sio.getvalue()

Here is the caller graph for this function:

Definition at line 1265 of file

01266     def test_none_as_value_stringified(self):
01267         cp = configparser.ConfigParser(allow_no_value=False)
01268         cp.add_section("section")
01269         with self.assertRaises(TypeError):
01270             cp.set("section", "option", None)

Here is the call graph for this function:

Definition at line 1271 of file

01272     def test_none_as_value_stringified_raw(self):
01273         output = self.prepare(configparser.RawConfigParser)
01274         self.assertEqual(output, self.expected_output)

Here is the call graph for this function:

Member Data Documentation

Definition at line 1254 of file

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