Test for ability to open a DB in an arbitrary Unicode path with a Unicode name.

And fix a couple of bugs that made the test fail.
This commit is contained in:
John Ralls
2014-04-03 14:16:16 -07:00
parent 9eeadca892
commit 7dfb2e016f
3 changed files with 46 additions and 6 deletions

View File

@@ -95,6 +95,10 @@ _ = glocale.translation.gettext
_LOG = logging.getLogger(DBLOGNAME)
LOG = logging.getLogger(".citation")
#_LOG.setLevel(logging.DEBUG)
#_hdlr = logging.StreamHandler()
#_hdlr.setFormatter(logging.Formatter(fmt="%(name)s.%(levelname)s: %(message)s"))
#_LOG.addHandler(_hdlr)
_MINVERSION = 9
_DBVERSION = 17
@@ -221,7 +225,7 @@ def _encode(path):
"""
Conditionally return the unicode string encoded to sys.filesystem.encoding
"""
if not (isinstance(path, UNITYPE) and win() and sys.version_info[0] < 3):
if not (isinstance(path, UNITYPE) and sys.version_info[0] < 3):
_LOG.debug("Didn't Encode %s", repr(path))
return path
_LOG.debug("Encoding %s", repr(path))