From 125bfc1f7f9f87d2df10a6b6f779c80e3df1acdd Mon Sep 17 00:00:00 2001 From: Toilal Date: Fri, 6 Nov 2015 22:44:51 +0100 Subject: [PATCH] Fix doctests for python 2.7 --- MIGRATION.rst | 2 +- README.rst | 2 +- pytest.ini | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/MIGRATION.rst b/MIGRATION.rst index 0879101..3e95ffd 100644 --- a/MIGRATION.rst +++ b/MIGRATION.rst @@ -11,7 +11,7 @@ API Example:: >>> from guessit import guessit - >>> guessit('Treme.1x03.Right.Place,.Wrong.Time.HDTV.XviD-NoTV.avi') + >>> guessit(u'Treme.1x03.Right.Place,.Wrong.Time.HDTV.XviD-NoTV.avi') # doctest: +ALLOW_UNICODE MatchesDict([('title', 'Treme'), ('season', 1), ('episodeNumber', 3), ('episodeTitle', 'Right Place, Wrong Time'), ('format', 'HDTV'), ('videoCodec', 'XviD'), ('releaseGroup', 'NoTV'), ('container', 'avi'), ('mimetype', 'video/x-msvideo'), ('type', 'episode')]) ``MatchesDict`` is a dict that keeps matches ordering. diff --git a/README.rst b/README.rst index 0d289ba..bcaa7ab 100644 --- a/README.rst +++ b/README.rst @@ -126,7 +126,7 @@ guessit can be use from command line:: It can also be used as a python module:: >>> from guessit import guessit - >>> guessit('Treme.1x03.Right.Place,.Wrong.Time.HDTV.XviD-NoTV.avi') + >>> guessit(u'Treme.1x03.Right.Place,.Wrong.Time.HDTV.XviD-NoTV.avi') # doctest: +ALLOW_UNICODE MatchesDict([('title', 'Treme'), ('season', 1), ('episodeNumber', 3), ('episodeTitle', 'Right Place, Wrong Time'), ('format', 'HDTV'), ('videoCodec', 'XviD'), ('releaseGroup', 'NoTV'), ('container', 'avi'), ('mimetype', 'video/x-msvideo'), ('type', 'episode')]) ``MatchesDict`` is a dict that keeps matches ordering. diff --git a/pytest.ini b/pytest.ini index eea5cce..ef511be 100644 --- a/pytest.ini +++ b/pytest.ini @@ -1,2 +1,2 @@ [pytest] -addopts =-s --ignore=setup.py --ignore=build --doctest-modules --doctest-glob='*.rst' +addopts=-s --ignore=setup.py --ignore=build --doctest-modules --doctest-glob='*.rst'