[Python-modules-commits] r31811 - in packages/python-git/trunk/debian/patches (2 files)

yoh at users.alioth.debian.org yoh at users.alioth.debian.org
Sat Feb 7 16:04:42 UTC 2015


    Date: Saturday, February 7, 2015 @ 16:04:41
  Author: yoh
Revision: 31811

patch to resolve failing test on a FS without unicode support

Added:
  packages/python-git/trunk/debian/patches/up_skiptest_if_filesystem_without_unicode
Modified:
  packages/python-git/trunk/debian/patches/series

Modified: packages/python-git/trunk/debian/patches/series
===================================================================
--- packages/python-git/trunk/debian/patches/series	2015-02-07 16:04:33 UTC (rev 31810)
+++ packages/python-git/trunk/debian/patches/series	2015-02-07 16:04:41 UTC (rev 31811)
@@ -1 +1,2 @@
 up_respect_git_python_test_env_var
+up_skiptest_if_filesystem_without_unicode

Added: packages/python-git/trunk/debian/patches/up_skiptest_if_filesystem_without_unicode
===================================================================
--- packages/python-git/trunk/debian/patches/up_skiptest_if_filesystem_without_unicode	                        (rev 0)
+++ packages/python-git/trunk/debian/patches/up_skiptest_if_filesystem_without_unicode	2015-02-07 16:04:41 UTC (rev 31811)
@@ -0,0 +1,27 @@
+Index: python-git-0.3.6+git5-gd8bbfea/git/test/test_base.py
+===================================================================
+--- python-git-0.3.6+git5-gd8bbfea.orig/git/test/test_base.py
++++ python-git-0.3.6+git5-gd8bbfea/git/test/test_base.py
+@@ -5,6 +5,7 @@
+ # This module is part of GitPython and is released under
+ # the BSD License: http://www.opensource.org/licenses/bsd-license.php
+ import os
++import sys
+ import tempfile
+ 
+ import git.objects.base as base
+@@ -116,6 +117,14 @@ class TestBase(TestBase):
+         filename = u"שלום.txt"
+ 
+         file_path = os.path.join(rw_repo.working_dir, filename)
++
++        # verify first that we could encode file name in this environment
++        try:
++            _ = file_path.encode(sys.getfilesystemencoding())
++        except UnicodeEncodeError:
++            from nose import SkipTest
++            raise SkipTest("Environment doesn't support unicode filenames")
++
+         open(file_path, "wb").write(b'something')
+ 
+         if os.name == 'nt':




More information about the Python-modules-commits mailing list