diff options
author | Ilya Tumaykin <itumaykin@gmail.com> | 2016-05-11 07:07:51 +0300 |
---|---|---|
committer | Ian Delaney <idella4@gentoo.org> | 2016-05-12 19:39:36 +0800 |
commit | 66e3db7c0e0fab956d152d12d812643cb846ae0d (patch) | |
tree | 5df53138953db18964aab74670aa5a1a7ace787e /dev-python/guessit/files | |
parent | media-video/subliminal: remove old (diff) | |
download | gentoo-66e3db7c0e0fab956d152d12d812643cb846ae0d.tar.gz gentoo-66e3db7c0e0fab956d152d12d812643cb846ae0d.tar.bz2 gentoo-66e3db7c0e0fab956d152d12d812643cb846ae0d.zip |
dev-python/guessit: remove old
Package-Manager: portage-2.2.28
Signed-off-by: Ian Delaney <idella4@gentoo.org>
Diffstat (limited to 'dev-python/guessit/files')
-rw-r--r-- | dev-python/guessit/files/guessit-0.5.4-python3.patch | 30 | ||||
-rw-r--r-- | dev-python/guessit/files/guessit-0.5.4-tests.patch | 172 |
2 files changed, 0 insertions, 202 deletions
diff --git a/dev-python/guessit/files/guessit-0.5.4-python3.patch b/dev-python/guessit/files/guessit-0.5.4-python3.patch deleted file mode 100644 index 954c7154a08a..000000000000 --- a/dev-python/guessit/files/guessit-0.5.4-python3.patch +++ /dev/null @@ -1,30 +0,0 @@ -From 93f4fe97f664c207e769186fe79961bf5a998447 Mon Sep 17 00:00:00 2001 -From: Nicolas Wack <wackou@gmail.com> -Date: Thu, 25 Apr 2013 16:05:05 +0200 -Subject: [PATCH] Fixed some unicode issues when reading files from disk - ---- - guessit/fileutils.py | 3 ++- - 1 file changed, 2 insertions(+), 1 deletion(-) - -diff --git a/guessit/fileutils.py b/guessit/fileutils.py -index 2fca6b7..dc077e6 100644 ---- a/guessit/fileutils.py -+++ b/guessit/fileutils.py -@@ -22,6 +22,7 @@ - from guessit import s, u - import os.path - import zipfile -+import io - - - def split_path(path): -@@ -84,4 +85,4 @@ def load_file_in_same_dir(ref_file, filename): - zfile = zipfile.ZipFile(zfilename) - return zfile.read('/'.join(path[i + 1:])) - -- return u(open(os.path.join(*path)).read()) -+ return u(io.open(os.path.join(*path), encoding='utf-8').read()) --- -1.8.1.6 - diff --git a/dev-python/guessit/files/guessit-0.5.4-tests.patch b/dev-python/guessit/files/guessit-0.5.4-tests.patch deleted file mode 100644 index 50d8f579e47e..000000000000 --- a/dev-python/guessit/files/guessit-0.5.4-tests.patch +++ /dev/null @@ -1,172 +0,0 @@ -From 409218bc3d5b62e4f3e37aa57126cd628a34bd21 Mon Sep 17 00:00:00 2001 -From: Nicolas Wack <wackou@gmail.com> -Date: Fri, 19 Apr 2013 22:08:38 +0200 -Subject: [PATCH] Allow to run tests using "python setup.py test"; fixed - autodetect_all test target - ---- - fabfile.py | 1 + - setup.py | 3 ++- - tests/__init__.py | 0 - tests/guessittest.py | 19 ++++++++++++------- - tests/test_autodetect.py | 2 +- - tests/test_autodetect_all.py | 12 ++++++++---- - 6 files changed, 24 insertions(+), 13 deletions(-) - create mode 100644 tests/__init__.py - -diff --git a/fabfile.py b/fabfile.py -index 5b2c9fe..d8c4112 100644 ---- a/fabfile.py -+++ b/fabfile.py -@@ -25,6 +25,7 @@ def run(self): - test_ep = TestTask('episode', 'episodes') - test_movie = TestTask('movie', 'movies') - test_auto = TestTask('autodetect', 'autodetected files') -+test_auto_all = TestTask('autodetect_all', 'all files using autodetected type') - test_lang = TestTask('language', 'languages') - test_utils = TestTask('utils', 'utility functions') - test_matchtree = TestTask('matchtree', 'MatchTree') -diff --git a/setup.py b/setup.py -index deee110..81f907d 100644 ---- a/setup.py -+++ b/setup.py -@@ -65,7 +65,8 @@ - include_package_data=True, - install_requires = requires, - entry_points=entry_points, -- extras_require = { 'language_detection': ['guess-language>=0.2'] } -+ extras_require = { 'language_detection': ['guess-language>=0.2'] }, -+ test_suite = 'tests' - ) - - -diff --git a/tests/__init__.py b/tests/__init__.py -new file mode 100644 -index 0000000..e69de29 -diff --git a/tests/guessittest.py b/tests/guessittest.py -index c56b6ca..cfeaef0 100644 ---- a/tests/guessittest.py -+++ b/tests/guessittest.py -@@ -21,7 +21,7 @@ - from __future__ import unicode_literals - from guessit import base_text_type, u - from guessit.slogging import setupLogging --from unittest import * -+from unittest import TestCase, TestLoader, TextTestRunner - - import yaml, logging, sys, os - from os.path import * -@@ -58,20 +58,25 @@ def allTests(testClass): - - class TestGuessit(TestCase): - -- -- -- def checkMinimumFieldsCorrect(self, filetype, filename, removeType=True): -+ def checkMinimumFieldsCorrect(self, filetype, filename, remove_type=True, -+ exclude_files=None): - groundTruth = yaml.load(load_file_in_same_dir(__file__, filename)) - def guess_func(string): - return guess_file_info(string, filetype=filetype) - -- return self.checkFields(groundTruth, guess_func, removeType) -+ return self.checkFields(groundTruth, guess_func, remove_type, exclude_files) - -- def checkFields(self, groundTruth, guess_func, removeType=True): -+ -+ def checkFields(self, groundTruth, guess_func, remove_type=True, -+ exclude_files=None): - correct, total = 0, 0 -+ exclude_files = exclude_files or [] - - for filename, required_fields in groundTruth.items(): - filename = u(filename) -+ if filename in exclude_files: -+ continue -+ - log.debug('\n' + '-' * 120) - log.info('Guessing information for file: %s' % filename) - -@@ -85,7 +90,7 @@ def error(*args): - is_incomplete[0] = True - - # no need for these in the unittests -- if removeType: -+ if remove_type: - try: - del found['type'] - except: -diff --git a/tests/test_autodetect.py b/tests/test_autodetect.py -index 1e0fd9d..e654afb 100644 ---- a/tests/test_autodetect.py -+++ b/tests/test_autodetect.py -@@ -25,7 +25,7 @@ class TestAutoDetect(TestGuessit): - def testAutoDetect(self): - self.checkMinimumFieldsCorrect(filetype='autodetect', - filename='autodetect.yaml', -- removeType=False) -+ remove_type=False) - - - suite = allTests(TestAutoDetect) -diff --git a/tests/test_autodetect_all.py b/tests/test_autodetect_all.py -index 6aa1704..cfd3463 100644 ---- a/tests/test_autodetect_all.py -+++ b/tests/test_autodetect_all.py -@@ -18,23 +18,27 @@ - # along with this program. If not, see <http://www.gnu.org/licenses/>. - # - -- -+from __future__ import unicode_literals - from guessittest import * - -+IGNORE_EPISODES = [ 'finale ' ] -+IGNORE_MOVIES = [] - - class TestAutoDetectAll(TestGuessit): - def testAutoMatcher(self): - self.checkMinimumFieldsCorrect(filetype='autodetect', - filename='autodetect.yaml', -- removeType=False) -+ remove_type=False) - - def testAutoMatcherMovies(self): - self.checkMinimumFieldsCorrect(filetype='autodetect', -- filename='movies.yaml') -+ filename='movies.yaml', -+ exclude_files=IGNORE_MOVIES) - - def testAutoMatcherEpisodes(self): - self.checkMinimumFieldsCorrect(filetype='autodetect', -- filename='episodes.yaml') -+ filename='episodes.yaml', -+ exclude_files=IGNORE_EPISODES) - - - suite = allTests(TestAutoDetectAll) --- -1.8.1.6 - -Added by maksbotan@gentoo.org, to be upstreamed - -diff -ur /var/tmp/portage/dev-python/guessit-0.5.4/work/guessit-0.5.4/tests/test_language.py guessit-0.5.4/tests/test_language.py ---- /var/tmp/portage/dev-python/guessit-0.5.4/work/guessit-0.5.4/tests/test_language.py 2013-02-11 03:49:53.000000000 +0400 -+++ guessit-0.5.4/tests/test_language.py 2013-04-25 18:41:22.000000000 +0400 -@@ -20,6 +20,7 @@ - - from __future__ import unicode_literals - from guessittest import * -+import io - - class TestLanguage(TestGuessit): - -@@ -81,7 +82,7 @@ - - def test_opensubtitles(self): - opensubtitles_langfile = file_in_same_dir(__file__, 'opensubtitles_languages_2012_05_09.txt') -- langs = [ u(l).strip().split('\t') for l in open(opensubtitles_langfile) ][1:] -+ langs = [ u(l).strip().split('\t') for l in io.open(opensubtitles_langfile, encoding="utf8") ][1:] - for lang in langs: - # check that we recognize the opensubtitles language code correctly - # and that we are able to output this code from a language |