[h5py] 305/455: Temporary fix for unicode detection in test suite

Ghislain Vaillant ghisvail-guest at moszumanska.debian.org
Thu Jul 2 18:19:44 UTC 2015


This is an automated email from the git hooks/post-receive script.

ghisvail-guest pushed a commit to annotated tag 1.3.0
in repository h5py.

commit 6aa27ee6576f69af6eb9c7b7506c7cb059b6e9de
Author: andrewcollette <andrew.collette at gmail.com>
Date:   Thu Aug 13 04:24:58 2009 +0000

    Temporary fix for unicode detection in test suite
---
 h5py/tests/test_highlevel.py | 12 +++++++++++-
 1 file changed, 11 insertions(+), 1 deletion(-)

diff --git a/h5py/tests/test_highlevel.py b/h5py/tests/test_highlevel.py
index c5106c2..911fcfe 100644
--- a/h5py/tests/test_highlevel.py
+++ b/h5py/tests/test_highlevel.py
@@ -43,7 +43,16 @@ TYPES = TYPES1 + TYPES2
 
 SHAPES = [(), (1,), (10,5), (1,10), (10,1), (100,1,100), (51,2,1025)]
 
- 
+
+def require_unicode(f):
+
+    try:
+        op.exists(u'\u201a')
+    except UnicodeError:
+        return None
+    else:
+        return f
+
 class TestFile(TestCasePlus):
 
     def setUp(self):
@@ -52,6 +61,7 @@ class TestFile(TestCasePlus):
     def tearDown(self):
         res.clear()
 
+    @require_unicode
     def test_unicode(self):
         # Two cases:
         # 1. Unicode

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/debian-science/packages/h5py.git



More information about the debian-science-commits mailing list