Back to index

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

List of all members.

Public Member Functions

def test_simple_writer
def test_simple_reader
def readerAssertEqual
def writerAssertEqual

Static Public Attributes

string dialect = 'unix'

Detailed Description

Definition at line 513 of file test_csv.py.


Member Function Documentation

def test.test_csv.TestCsvBase.readerAssertEqual (   self,
  input,
  expected_result 
) [inherited]

Definition at line 388 of file test_csv.py.

00388 
00389     def readerAssertEqual(self, input, expected_result):
00390         with TemporaryFile("w+", newline='') as fileobj:
00391             fileobj.write(input)
00392             fileobj.seek(0)
00393             reader = csv.reader(fileobj, dialect = self.dialect)
00394             fields = list(reader)
00395             self.assertEqual(fields, expected_result)

Here is the call graph for this function:

Here is the caller graph for this function:

Definition at line 519 of file test_csv.py.

00519 
00520     def test_simple_reader(self):
00521         self.readerAssertEqual('"1","abc def","abc"\n', [['1', 'abc def', 'abc']])

Here is the call graph for this function:

Definition at line 516 of file test_csv.py.

00516 
00517     def test_simple_writer(self):
00518         self.writerAssertEqual([[1, 'abc def', 'abc']], '"1","abc def","abc"\n')

Here is the call graph for this function:

def test.test_csv.TestCsvBase.writerAssertEqual (   self,
  input,
  expected_result 
) [inherited]

Definition at line 396 of file test_csv.py.

00396 
00397     def writerAssertEqual(self, input, expected_result):
00398         with TemporaryFile("w+", newline='') as fileobj:
00399             writer = csv.writer(fileobj, dialect = self.dialect)
00400             writer.writerows(input)
00401             fileobj.seek(0)
00402             self.assertEqual(fileobj.read(), expected_result)

Here is the call graph for this function:

Here is the caller graph for this function:


Member Data Documentation

Definition at line 514 of file test_csv.py.


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