Use StringIO.StringIO() with python2

This commit is contained in:
3c7 2017-04-07 08:02:37 +02:00
parent b1fe05f2c2
commit bb31eba28a

View File

@ -5,11 +5,17 @@ import os
import sys
import json
import unittest
from io import StringIO
from io import open
from io import open
from cortexutils.analyzer import Analyzer
# Different lib when using python3 or 2
if sys.version_info > (2, 8):
from io import StringIO
else:
from StringIO import StringIO
def load_test_fixture(fixture_path):
path = os.path.dirname(os.path.abspath(__file__))