JMXQuery icon indicating copy to clipboard operation
JMXQuery copied to clipboard

Python27 support

Open chorejasbob opened this issue 5 years ago • 2 comments

Python 2.7 tests passing:

`(venv)$ python --version Python 2.7.16 (venv)$ nosetests -v tests/test_JMXQuery.py tests.test_JMXQuery.test_wildcard_query ... ok tests.test_JMXQuery.test_kafka_plugin ... ok This test is to check that we don't get any threading issues as the module will be ... ok


Ran 3 tests in 9.018s

OK `

Python 3.6 tests passing:

`(venv)$ source ../venv3/bin/activate (venv3)$ python --version Python 3.7.3 (venv3)$ nosetests -v tests/test_JMXQuery.py tests.test_JMXQuery.test_wildcard_query ... ok tests.test_JMXQuery.test_kafka_plugin ... ok This test is to check that we don't get any threading issues as the module will be ... ok


Ran 3 tests in 8.689s

OK `

chorejasbob avatar Nov 18 '19 22:11 chorejasbob

fixes issue #15

chorejasbob avatar Nov 18 '19 22:11 chorejasbob

Updated with the recommendations, except for two things.

  1. The builtin subprocess module in python 2.7 doesn't include a timeout option or the run() method call, which this uses.

  2. enum appears to be included in the python 2.7 standard library.

I found that nosetests swallows any print statements by default, except if you use the '-s' or '--nocapture' option. The following gist shows the results of the tests.

https://gist.github.com/chorejasbob/890137b096ffae50dc86158d60c0c062

chorejasbob avatar Nov 20 '19 13:11 chorejasbob