Skip to content

Commit

Permalink
Fix DeprecationWarning: invalid escape sequence
Browse files Browse the repository at this point in the history
Signed-off-by: Mickaël Schoentgen <contact@tiger-222.fr>
  • Loading branch information
BoboTiG authored and ericwb committed Jan 7, 2019
1 parent 917551a commit 3747dc8
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion examples/partial_path_process.py
Expand Up @@ -9,5 +9,5 @@

pop('../ls -l', shell=False)

pop('c:\hello\something', shell=False)
pop('c:\\hello\\something', shell=False)
pop('c:/hello/something_else', shell=False)
6 changes: 3 additions & 3 deletions tests/unit/core/test_util.py
Expand Up @@ -252,15 +252,15 @@ def test_escaped_representation_simple(self):
self.assertEqual(res, b"ascii")

def test_escaped_representation_valid_not_printable(self):
res = b_utils.escaped_bytes_representation(b"\u0000")
res = b_utils.escaped_bytes_representation(b"\\u0000")
self.assertEqual(res, b"\\x00")

def test_escaped_representation_invalid(self):
res = b_utils.escaped_bytes_representation(b"\uffff")
res = b_utils.escaped_bytes_representation(b"\\uffff")
self.assertEqual(res, b"\\uffff")

def test_escaped_representation_mixed(self):
res = b_utils.escaped_bytes_representation(b"ascii\u0000\uffff")
res = b_utils.escaped_bytes_representation(b"ascii\\u0000\\uffff")
self.assertEqual(res, b"ascii\\x00\\uffff")

def test_deepgetattr(self):
Expand Down

0 comments on commit 3747dc8

Please sign in to comment.