Skip to content

Commit

Permalink
Fix Pytest DeprecationWarning: invalid escape sequence \s (#1222)
Browse files Browse the repository at this point in the history
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
```
  • Loading branch information
cclauss authored and mnaberez committed Apr 7, 2019
1 parent f39d791 commit b6b762d
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions supervisor/tests/test_end_to_end.py
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ def test_issue_664(self):
supervisorctl = pexpect.spawn(sys.executable, args, encoding='utf-8')
self.addCleanup(supervisorctl.kill, signal.SIGINT)
try:
supervisorctl.expect('test_öäü\s+RUNNING', timeout=30)
supervisorctl.expect('test_öäü\\s+RUNNING', timeout=30)
seen = True
except pexpect.ExceptionPexpect:
seen = False
Expand Down Expand Up @@ -123,7 +123,7 @@ def test_issue_1054(self):
args = ['-m', 'supervisor.supervisorctl', '-c', filename, 'avail']
supervisorctl = pexpect.spawn(sys.executable, args, encoding='utf-8')
try:
supervisorctl.expect('cat\s+in use\s+auto', timeout=30)
supervisorctl.expect('cat\s+in use\\s+auto', timeout=30)
seen = True
except pexpect.ExceptionPexpect:
seen = False
Expand Down

0 comments on commit b6b762d

Please sign in to comment.