diff options
author | dluyer <53582923+dluyer@users.noreply.github.com> | 2019-08-06 10:40:58 -0700 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-08-06 10:40:58 -0700 |
commit | 2f9291a2b645781838722148c7c5e03fe4c38a7f (patch) | |
tree | 177bb91069916fed2987e256ca76bf5d703af8f2 | |
parent | 1dd76ca951670f87b78b75c78697647001f68386 (diff) | |
download | pexpect-git-2f9291a2b645781838722148c7c5e03fe4c38a7f.tar.gz |
Fix copy/paste error in uploading patch
-rwxr-xr-x | tests/test_ansi.py | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/tests/test_ansi.py b/tests/test_ansi.py index 2140013..3d73fe8 100755 --- a/tests/test_ansi.py +++ b/tests/test_ansi.py @@ -121,19 +121,19 @@ class ansiTestCase (PexpectTestCase.PexpectTestCase): def test_torturet (self): s = ANSI.ANSI (24,80) + with open('torturet.vt') as f: + sample_text = f.read() # This causes ANSI.py's DoLog to write in the cwd. Make sure we're in a # writeable directory. d = tempfile.mkdtemp() old_cwd = os.getcwd() os.chdir(d) try: - with open('torturet.vt') as f: - sample_text = f.read() + for c in sample_text: + s.process (c) finally: os.chdir(old_cwd) shutil.rmtree(d) - for c in sample_text: - s.process (c) assert s.pretty() == torture_target, 'processed: \n' + s.pretty() + '\nexpected:\n' + torture_target def test_tetris (self): |