[tests] increasing coverage

This commit is contained in:
mzwiessele 2015-10-11 09:49:05 +01:00
parent 00e1125d4b
commit 21690e2408
2 changed files with 2 additions and 16 deletions

View file

@ -43,20 +43,6 @@ def load(file_or_path):
:param file_name: path/to/file.pickle
"""
try:
unicode = unicode
except NameError:
# 'unicode' is undefined, must be Python 3
str = str
unicode = str
bytes = bytes
basestring = (str,bytes)
else:
# 'unicode' exists, must be Python 2
str = str
unicode = unicode
bytes = str
basestring = basestring
try:
import cPickle as pickle
if isinstance(file_or_path, basestring):
with open(file_or_path, 'rb') as f:
@ -65,7 +51,7 @@ def load(file_or_path):
m = pickle.load(file_or_path)
except:
import pickle
if isinstance(file_or_path, basestring):
if isinstance(file_or_path, str):
with open(file_or_path, 'rb') as f:
m = pickle.load(f)
else: