mirror of
https://github.com/valitydev/Cortex-Analyzers.git
synced 2024-11-06 09:05:19 +00:00
Use StringIO.StringIO() with python2
This commit is contained in:
parent
b1fe05f2c2
commit
bb31eba28a
@ -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__))
|
||||
|
Loading…
Reference in New Issue
Block a user