From f962bc71fee609cd54fe69c956c8b81703d2c19a Mon Sep 17 00:00:00 2001 From: Vincent Jacques Date: Fri, 22 Mar 2013 00:29:44 +0100 Subject: [PATCH] Fix tests for Python 2.5 --- github/tests/Framework.py | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/github/tests/Framework.py b/github/tests/Framework.py index c820172d..a70b9e52 100644 --- a/github/tests/Framework.py +++ b/github/tests/Framework.py @@ -18,14 +18,19 @@ import sys import unittest import httplib import traceback -import json import urlparse import github +atLeastPython26 = sys.hexversion >= 0x02060000 atLeastPython3 = sys.hexversion >= 0x03000000 atMostPython32 = sys.hexversion < 0x03030000 +if atLeastPython26: + import json +else: # pragma no cover + import simplejson as json # pragma no cover + def readLine(file): if atLeastPython3: