Skip to content

Commit 951a5c9

Browse files
committed
test windows
1 parent 9f2ee52 commit 951a5c9

3 files changed

Lines changed: 11 additions & 2 deletions

File tree

src/epicure/Utils.py

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1176,6 +1176,13 @@ def shortcut_click_match( shortcut, event ):
11761176
return False
11771177
return True
11781178

1179+
def is_windows():
1180+
""" Is running on windows or not """
1181+
try:
1182+
return platform.lower().startswith("win")
1183+
except:
1184+
return False
1185+
11791186
def is_darwin():
11801187
""" Test if OS is MacOS or not """
11811188
try:

src/epicure/epicuring.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -804,7 +804,10 @@ def load_epicure_data(self, epiname):
804804
"""Load saved infos from file"""
805805
infile = open(epiname, "rb")
806806
try:
807-
epidata = pickle.load( infile )
807+
if ut.is_windows():
808+
epidata = pickle.load( infile, encoding="latin1" )
809+
else:
810+
epidata = pickle.load( infile )
808811
#print(epidata)
809812
if "EpiMetaData" in epidata.keys():
810813
# version of epicure file after Epicure 0.2.0

tox.ini

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,4 +30,3 @@ extras =
3030
testing
3131

3232
commands = pytest -v --color=yes
33-
#--cov=epicure --cov-report=xml

0 commit comments

Comments
 (0)