Skip to content

Commit 2d6be54

Browse files
author
Philip Langdale
committed
[python tests] Make test_yarn consistent with respect to importing 'json'
It's unclear if this is futile or not. I don't believe the library works on Python < 2.6 any more, and I'm very sure unit tests don't work on Python < 2.7.
1 parent a114839 commit 2d6be54

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

python/src/cm_api_tests/test_yarn.py

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,13 +15,17 @@
1515
# limitations under the License.
1616

1717
import datetime
18-
import json
1918
import unittest
2019
from cm_api.endpoints.clusters import *
2120
from cm_api.endpoints.services import *
2221
from cm_api.endpoints.types import *
2322
from cm_api_tests import utils
2423

24+
try:
25+
import json
26+
except ImportError:
27+
import simplejson as json
28+
2529
class TestYarn(unittest.TestCase):
2630

2731
def test_get_yarn_applications(self):

0 commit comments

Comments
 (0)