Skip to content

Commit b6b762d

Browse files
cclaussmnaberez
authored andcommitted
Fix Pytest DeprecationWarning: invalid escape sequence \s (#1222)
https://travis-ci.org/Supervisor/supervisor/jobs/516836395#L260-L269 ``` =============================== warnings summary =============================== supervisor/tests/test_end_to_end.py:74 /home/travis/build/Supervisor/supervisor/supervisor/tests/test_end_to_end.py:74: DeprecationWarning: invalid escape sequence \s supervisorctl.expect('test_öäü\s+RUNNING', timeout=30) supervisor/tests/test_end_to_end.py:126 /home/travis/build/Supervisor/supervisor/supervisor/tests/test_end_to_end.py:126: DeprecationWarning: invalid escape sequence \s supervisorctl.expect('cat\s+in use\s+auto', timeout=30) -- Docs: https://docs.pytest.org/en/latest/warnings.html ```
1 parent f39d791 commit b6b762d

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

supervisor/tests/test_end_to_end.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,7 @@ def test_issue_664(self):
7171
supervisorctl = pexpect.spawn(sys.executable, args, encoding='utf-8')
7272
self.addCleanup(supervisorctl.kill, signal.SIGINT)
7373
try:
74-
supervisorctl.expect('test_öäü\s+RUNNING', timeout=30)
74+
supervisorctl.expect('test_öäü\\s+RUNNING', timeout=30)
7575
seen = True
7676
except pexpect.ExceptionPexpect:
7777
seen = False
@@ -123,7 +123,7 @@ def test_issue_1054(self):
123123
args = ['-m', 'supervisor.supervisorctl', '-c', filename, 'avail']
124124
supervisorctl = pexpect.spawn(sys.executable, args, encoding='utf-8')
125125
try:
126-
supervisorctl.expect('cat\s+in use\s+auto', timeout=30)
126+
supervisorctl.expect('cat\s+in use\\s+auto', timeout=30)
127127
seen = True
128128
except pexpect.ExceptionPexpect:
129129
seen = False

0 commit comments

Comments
 (0)