Ejemplo n.º 1
0
 def test_searcher_string(self):
     ss = pexpect.searcher_string(['this', 'that', 'and', 'the', 'other'])
     assert ss.__str__(
     ) == 'searcher_string:\n    0: "this"\n    1: "that"\n    2: "and"\n    3: "the"\n    4: "other"', repr(
         ss.__str__())
     ss = pexpect.searcher_string([
         'this', pexpect.EOF, 'that', 'and', 'the', 'other', pexpect.TIMEOUT
     ])
     assert ss.__str__(
     ) == 'searcher_string:\n    0: "this"\n    1: EOF\n    2: "that"\n    3: "and"\n    4: "the"\n    5: "other"\n    6: TIMEOUT'
Ejemplo n.º 2
0
 def test_searcher_string(self):
     ss = pexpect.searcher_string(['this', 'that', 'and', 'the', 'other'])
     out = ('searcher_string:\n    0: "this"\n    1: "that"\n    '
            '2: "and"\n    3: "the"\n    4: "other"')
     assert ss.__str__() == out, (ss.__str__(), out)
     ss = pexpect.searcher_string([
         'this', pexpect.EOF, 'that', 'and', 'the', 'other', pexpect.TIMEOUT
     ])
     out = ('searcher_string:\n    0: "this"\n    1: EOF\n    '
            '2: "that"\n    3: "and"\n    4: "the"\n    '
            '5: "other"\n    6: TIMEOUT')
     assert ss.__str__() == out, (ss.__str__(), out)
Ejemplo n.º 3
0
 def test_searcher_string (self):
     ss = pexpect.searcher_string ([
         'this', 'that', 'and', 'the', 'other' ])
     out = ('searcher_string:\n    0: "this"\n    1: "that"\n    '
            '2: "and"\n    3: "the"\n    4: "other"')
     assert ss.__str__() == out, (ss.__str__(), out)
     ss = pexpect.searcher_string ([
         'this', pexpect.EOF, 'that', 'and',
         'the', 'other', pexpect.TIMEOUT ])
     out = ('searcher_string:\n    0: "this"\n    1: EOF\n    '
            '2: "that"\n    3: "and"\n    4: "the"\n    '
            '5: "other"\n    6: TIMEOUT')
     assert ss.__str__() == out, (ss.__str__(), out)
Ejemplo n.º 4
0
 def test_searcher_string (self):
     ss = pexpect.searcher_string (['this','that','and','the','other'])
     assert ss.__str__() == 'searcher_string:\n    0: "this"\n    1: "that"\n    2: "and"\n    3: "the"\n    4: "other"', repr(ss.__str__())
     ss = pexpect.searcher_string (['this',pexpect.EOF,'that','and','the','other',pexpect.TIMEOUT])
     assert ss.__str__() == 'searcher_string:\n    0: "this"\n    1: EOF\n    2: "that"\n    3: "and"\n    4: "the"\n    5: "other"\n    6: TIMEOUT'