Back to index

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


class  PtyTest


def debug
def normalize_output
def test_main


tuple fcntl = import_module('fcntl')
string TEST_STRING_1 = "I wish to buy a fish license.\n"
string TEST_STRING_2 = "For my pet fish, Eric.\n"

Function Documentation

def test.test_pty.debug (   msg)

Definition at line 18 of file

00019     def debug(msg):
00020         print(msg)

Here is the caller graph for this function:

Definition at line 25 of file

00026 def normalize_output(data):
00027     # Some operating systems do conversions on newline.  We could possibly
00028     # fix that by doing the appropriate termios.tcsetattr()s.  I couldn't
00029     # figure out the right combo on Tru64 and I don't have an IRIX box.
00030     # So just normalize the output and doc the problem O/Ses by allowing
00031     # certain combinations for some platforms, but avoid allowing other
00032     # differences (like extra whitespace, trailing garbage, etc.)
00034     # This is about the best we can do without getting some feedback
00035     # from someone more knowledgable.
00037     # OSF/1 (Tru64) apparently turns \n into \r\r\n.
00038     if data.endswith(b'\r\r\n'):
00039         return data.replace(b'\r\r\n', b'\n')
00041     # IRIX apparently turns \n into \r\n.
00042     if data.endswith(b'\r\n'):
00043         return data.replace(b'\r\n', b'\n')
00045     return data
00048 # Marginal testing of pty suite. Cannot do extensive 'do or fail' testing
00049 # because pty code is not too portable.
# XXX(nnorwitz):  these tests leak fds when there is an error.

Here is the caller graph for this function:

def test.test_pty.test_main (   verbose = None)

Definition at line 197 of file

00198 def test_main(verbose=None):
00199     try:
00200         run_unittest(PtyTest)
00201     finally:
00202         reap_children()

Here is the call graph for this function:

Variable Documentation

tuple test.test_pty.fcntl = import_module('fcntl')

Definition at line 4 of file

string test.test_pty.TEST_STRING_1 = "I wish to buy a fish license.\n"

Definition at line 14 of file

Definition at line 15 of file