summaryrefslogtreecommitdiff
path: root/tests/test_dotall.py
diff options
context:
space:
mode:
authorjquast <contact@jeffquast.com>2013-09-22 19:32:33 -0700
committerjquast <contact@jeffquast.com>2013-09-22 19:32:33 -0700
commitc851a110a61f20c2163aacdf6afe210d572d777b (patch)
tree6b07f4c3638b22fe5552efe333e0397fa4d9c8fd /tests/test_dotall.py
parenta83cf59505e18fd4ee0c84c4a1dd724e6f916e16 (diff)
downloadpexpect-git-c851a110a61f20c2163aacdf6afe210d572d777b.tar.gz
py2.5 compatibilities w/six.py
-except Exception as e: +except Exception, err: the unfortunate use of six.b('') instead of b'' print(arg0, arg1) => six.print_(arg0, arg1) some autopep8 -i is definitely called for, some of these test cases are darn unreadable, but did partially pep8 some of the really-long-over-80col-lines.
Diffstat (limited to 'tests/test_dotall.py')
-rwxr-xr-xtests/test_dotall.py5
1 files changed, 3 insertions, 2 deletions
diff --git a/tests/test_dotall.py b/tests/test_dotall.py
index 7f574b3..f487cec 100755
--- a/tests/test_dotall.py
+++ b/tests/test_dotall.py
@@ -22,17 +22,18 @@ import pexpect
import unittest
import re
import PexpectTestCase
+from pexpect import six
testdata = 'BEGIN\nHello world\nEND'
class TestCaseDotall(PexpectTestCase.PexpectTestCase):
def test_dotall (self):
p = pexpect.spawn('echo "%s"' % testdata)
- i = p.expect ([b'BEGIN(.*)END', pexpect.EOF])
+ i = p.expect ([six.b('BEGIN(.*)END'), pexpect.EOF])
assert i==0, 'DOTALL does not seem to be working.'
def test_precompiled (self):
p = pexpect.spawn('echo "%s"' % testdata)
- pat = re.compile(b'BEGIN(.*)END') # This overrides the default DOTALL.
+ pat = re.compile(six.b('BEGIN(.*)END')) # This overrides the default DOTALL.
i = p.expect ([pat, pexpect.EOF])
assert i==1, 'Precompiled pattern to override DOTALL does not seem to be working.'