logo

youtube-dl

[mirror] Download/Watch videos from video hosters
commit: 6864855eb111dbf6e0efe9ed086f48efa1d9f209
parent d861a9d5814408973e0715bb9160fb7db34fbcd0
Author: Sergey M․ <dstftw@gmail.com>
Date:   Fri, 23 Nov 2018 00:43:42 +0700

[tests] Fix invalid escape sequences

Diffstat:

Mtest/test_compat.py2+-
Mtest/test_postprocessors.py2+-
2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/test/test_compat.py b/test/test_compat.py @@ -39,7 +39,7 @@ class TestCompat(unittest.TestCase): def test_compat_expanduser(self): old_home = os.environ.get('HOME') - test_str = 'C:\Documents and Settings\тест\Application Data' + test_str = r'C:\Documents and Settings\тест\Application Data' compat_setenv('HOME', test_str) self.assertEqual(compat_expanduser('~'), test_str) compat_setenv('HOME', old_home or '') diff --git a/test/test_postprocessors.py b/test/test_postprocessors.py @@ -14,4 +14,4 @@ from youtube_dl.postprocessor import MetadataFromTitlePP class TestMetadataFromTitle(unittest.TestCase): def test_format_to_regex(self): pp = MetadataFromTitlePP(None, '%(title)s - %(artist)s') - self.assertEqual(pp._titleregex, '(?P<title>.+)\ \-\ (?P<artist>.+)') + self.assertEqual(pp._titleregex, r'(?P<title>.+)\ \-\ (?P<artist>.+)')