Blame 3f9b0d8c-test-tmp-db-fs-encoding.patch
|
|
269112a |
diff --git a/test/test_plyvel.py b/test/test_plyvel.py
|
|
|
269112a |
index 58481f4..f6470d6 100644
|
|
|
269112a |
--- a/test/test_plyvel.py
|
|
|
269112a |
+++ b/test/test_plyvel.py
|
|
|
269112a |
@@ -6,6 +6,7 @@
|
|
|
269112a |
import os
|
|
|
269112a |
import shutil
|
|
|
269112a |
import stat
|
|
|
269112a |
+import sys
|
|
|
269112a |
import tempfile
|
|
|
269112a |
|
|
|
269112a |
try:
|
|
|
269112a |
@@ -20,6 +21,7 @@
|
|
|
269112a |
# Python 3
|
|
|
269112a |
xrange = range
|
|
|
269112a |
|
|
|
269112a |
+from nose.plugins.skip import SkipTest
|
|
|
269112a |
from nose.tools import (
|
|
|
269112a |
assert_equal,
|
|
|
269112a |
assert_greater_equal,
|
|
|
269112a |
@@ -97,9 +99,6 @@ def test_open():
|
|
|
269112a |
with assert_raises(plyvel.IOError):
|
|
|
269112a |
DB(name)
|
|
|
269112a |
|
|
|
269112a |
- with tmp_db('úñîçøđê_name') as db:
|
|
|
269112a |
- pass
|
|
|
269112a |
-
|
|
|
269112a |
with tmp_db('no_create', create=False) as name:
|
|
|
269112a |
with assert_raises(plyvel.Error):
|
|
|
269112a |
DB(name, create_if_missing=False)
|
|
|
269112a |
@@ -134,6 +133,15 @@ def test_open():
|
|
|
269112a |
compression='snappy', bloom_filter_bits=10)
|
|
|
269112a |
|
|
|
269112a |
|
|
|
269112a |
+def test_open_unicode_name():
|
|
|
269112a |
+ if sys.getfilesystemencoding().lower() != 'utf-8':
|
|
|
269112a |
+ # XXX: letter casing differs between Python 2 and 3
|
|
|
269112a |
+ raise SkipTest("Not running with UTF-8 file system encoding")
|
|
|
269112a |
+
|
|
|
269112a |
+ with tmp_db('úñîçøđê_name'):
|
|
|
269112a |
+ pass
|
|
|
269112a |
+
|
|
|
269112a |
+
|
|
|
269112a |
def test_open_close():
|
|
|
269112a |
with tmp_db('open_close', create=False) as name:
|
|
|
269112a |
# Create a database with options that result in additional
|