[Python-modules-commits] r28009 - in packages/guessit/trunk/debian (4 files)

emillon-guest at users.alioth.debian.org emillon-guest at users.alioth.debian.org
Tue Mar 4 15:27:50 UTC 2014


    Date: Tuesday, March 4, 2014 @ 15:27:48
  Author: emillon-guest
Revision: 28009

guessit: patch to fix tests

Added:
  packages/guessit/trunk/debian/patches/
  packages/guessit/trunk/debian/patches/series
  packages/guessit/trunk/debian/patches/stdout_encoding.patch
  packages/guessit/trunk/debian/patches/test_hash.patch

Added: packages/guessit/trunk/debian/patches/series
===================================================================
--- packages/guessit/trunk/debian/patches/series	                        (rev 0)
+++ packages/guessit/trunk/debian/patches/series	2014-03-04 15:27:48 UTC (rev 28009)
@@ -0,0 +1,2 @@
+test_hash.patch
+stdout_encoding.patch

Added: packages/guessit/trunk/debian/patches/stdout_encoding.patch
===================================================================
--- packages/guessit/trunk/debian/patches/stdout_encoding.patch	                        (rev 0)
+++ packages/guessit/trunk/debian/patches/stdout_encoding.patch	2014-03-04 15:27:48 UTC (rev 28009)
@@ -0,0 +1,21 @@
+From: Etienne Millon <me at emillon.org>
+Subject: Print filenames as ASCII only
+
+Guessit's demo function prints the filenames to the terminal.
+It fails if the terminal is not unicode aware, which is the case when LC_ALL=C
+(eg when tests are run under pybuild).
+
+Forwarded: not-needed
+Last-Update: 2014-03-04
+
+--- a/guessit/__main__.py
++++ b/guessit/__main__.py
+@@ -31,7 +31,7 @@
+     options = options or {}
+     filename = u(filename)
+ 
+-    print('For:', filename)
++    print('For:', filename.encode('ascii', 'backslashreplace'))
+     guess = guess_file_info(filename, info, options, **kwargs)
+     if options.get('yaml'):
+         try:

Added: packages/guessit/trunk/debian/patches/test_hash.patch
===================================================================
--- packages/guessit/trunk/debian/patches/test_hash.patch	                        (rev 0)
+++ packages/guessit/trunk/debian/patches/test_hash.patch	2014-03-04 15:27:48 UTC (rev 28009)
@@ -0,0 +1,29 @@
+From: Etienne Millon <me at emillon.org>
+Subject: Skip tests that need the '1MB' file
+
+In the git repository, there is a file named '1MB' (of the same size) on which
+some tests are done. It is omitted from the tarball, so these tests fail.
+
+They are not indispensable, so it's better to skip them than to make a bigger
+tarball.
+
+Forwarded: not-needed
+Last-Update: 2014-03-04
+
+--- a/guessit/test/test_hashes.py
++++ b/guessit/test/test_hashes.py
+@@ -26,10 +26,10 @@
+ class TestHashes(TestGuessit):
+     def test_hashes(self):
+         hashes = (
+-                  ('hash_mpc', '1MB', u'8542ad406c15c8bd'),  # TODO: Check if this value is valid
+-                  ('hash_ed2k', '1MB', u'ed2k://|file|1MB|1048576|AA3CC5552A9931A76B61A41D306735F7|/'),  # TODO: Check if this value is valid
+-                  ('hash_md5', '1MB', u'5d8dcbca8d8ac21766f28797d6c3954c'),
+-                  ('hash_sha1', '1MB', u'51d2b8f3248d7ee495b7750c8da5aa3b3819de9d'),
++#                  ('hash_mpc', '1MB', u'8542ad406c15c8bd'),  # TODO: Check if this value is valid
++#                  ('hash_ed2k', '1MB', u'ed2k://|file|1MB|1048576|AA3CC5552A9931A76B61A41D306735F7|/'),  # TODO: Check if this value is valid
++#                  ('hash_md5', '1MB', u'5d8dcbca8d8ac21766f28797d6c3954c'),
++#                  ('hash_sha1', '1MB', u'51d2b8f3248d7ee495b7750c8da5aa3b3819de9d'),
+                   ('hash_md5', 'dummy.srt', u'64de6b5893cac24456c46a935ef9c359'),
+                   ('hash_sha1', 'dummy.srt', u'a703fc0fa4518080505809bf562c6fc6f7b3c98c')
+                   )




More information about the Python-modules-commits mailing list