From 0f4d723ce6a4597e912fa82a6f427fd508875a89 Mon Sep 17 00:00:00 2001 From: a-tal Date: Sat, 12 Apr 2014 01:23:09 -0400 Subject: [PATCH] py2.6 support --- conftest.py | 2 +- test/test_format.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/conftest.py b/conftest.py index b0e653a..d42e0db 100644 --- a/conftest.py +++ b/conftest.py @@ -12,6 +12,6 @@ def session_setup(): env_key = "TWIT_OAUTH" if env_key in os.environ: with open(os.path.expanduser("~/.pyweet"), "w") as api_file: - api_file.write("{}\n{}".format(*os.environ[env_key].split("|"))) + api_file.write("{0}\n{1}".format(*os.environ[env_key].split("|"))) assert os.path.exists(os.path.expanduser("~/.pyweet")), "no user auth key" diff --git a/test/test_format.py b/test/test_format.py index dfa2c40..1d265db 100644 --- a/test/test_format.py +++ b/test/test_format.py @@ -9,7 +9,7 @@ import json import pytest -if sys.version_info.major >= 3: +if sys.version_info > (3,): from io import StringIO else: from StringIO import StringIO