Skip to content

Commit

Permalink
Test files support both Python 2 and 3
Browse files Browse the repository at this point in the history
  • Loading branch information
Kiri Choi committed Sep 6, 2018
1 parent 2c12c8d commit 7525c9c
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions wrappers/Python/roadrunner/testing/testfiles.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import pkgutil
import os
import os, sys
import os.path
import glob
import roadrunner
Expand Down Expand Up @@ -34,5 +34,8 @@ def getRoadRunner(resource):
"""
data = pkgutil.get_data(__name__, resource)
r = roadrunner.RoadRunner()
r.load(data.decode())
if sys.version_info[0] < 3:
r.load(data)
else:
r.load(data.decode())
return r

0 comments on commit 7525c9c

Please sign in to comment.