diff options
author | Irina Truong <i.chernyavska@gmail.com> | 2018-09-23 14:34:58 -0700 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-09-23 14:34:58 -0700 |
commit | 364ee6c33d74ef5b907242cd56f299409e06bcd1 (patch) | |
tree | 4d155c79a0f18f1b6c2fb9d1abe731e2b52b4572 /tests/features | |
parent | 381869b72712310c05c5643dc89b7fe656e99255 (diff) | |
parent | 172c9cd271afe8fe415850b996da2e50ad3b4270 (diff) |
Merge pull request #871 from maxrothman/master
Respect \pset pager on expected behavior
Diffstat (limited to 'tests/features')
-rw-r--r-- | tests/features/steps/wrappers.py | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/tests/features/steps/wrappers.py b/tests/features/steps/wrappers.py index de49cede..9a7f89da 100644 --- a/tests/features/steps/wrappers.py +++ b/tests/features/steps/wrappers.py @@ -3,6 +3,7 @@ from __future__ import unicode_literals import re import pexpect +from pgcli.main import COLOR_CODE_REGEX def expect_exact(context, expected, timeout): @@ -10,7 +11,7 @@ def expect_exact(context, expected, timeout): context.cli.expect_exact(expected, timeout=timeout) except: # Strip color codes out of the output. - actual = re.sub(r'\x1b\[([0-9A-Za-z;?])+[m|K]?', '', context.cli.before) + actual = COLOR_CODE_REGEX.sub('', context.cli.before) raise Exception('Expected:\n---\n{0!r}\n---\n\nActual:\n---\n{1!r}\n---'.format( expected, actual)) |