before_script:
- sudo apt-get -y install qemu-user-static
- - sudo add-apt-repository -y ppa:jonathonf/python-3.6
+ - sudo add-apt-repository -y ppa:deadsnakes/ppa
- sudo apt-get update
- sudo apt-get install python3.6 python3.6-dev
- sudo pip install tox
mock # BSD
nose # LGPL
flake8<2.6.0,>=2.5.4 # MIT
-pylint==1.4.5 # GPLv2
+pylint # GPLv2
sphinx!=1.6.6,!=1.6.7,<2.0.0;python_version=='2.7' # BSD
sphinx!=1.6.6,!=1.6.7;python_version>='3.4' # BSD
sphinx-rtd-theme
[tox]
-envlist = docs,pep8,pylint,yamllint,ansiblelint,bashate,py27,perm,cover
+envlist = docs,pep8,pylint,yamllint,ansiblelint,bashate,py27,py36,cover
skipsdist = True
[testenv]
class AbstractFeatureTesting(unittest.TestCase):
def test_run_unimplemented(self):
+ # pylint: disable=abstract-class-instantiated
with self.assertRaises(TypeError):
feature.Feature(case_name="feature", project_name="xtesting")
class AbstractTestCaseTesting(unittest.TestCase):
def test_run_unimplemented(self):
+ # pylint: disable=abstract-class-instantiated
with self.assertRaises(TypeError):
testcase.TestCase(case_name="base", project_name="xtesting")
EnergyRecorder.energy_recorder_api = None
EnergyRecorder.load_config()
- self.assertEquals(
+ self.assertEqual(
EnergyRecorder.energy_recorder_api["auth"],
("user", "password")
)
- self.assertEquals(
+ self.assertEqual(
EnergyRecorder.energy_recorder_api["uri"],
"http://pod-uri:8888/recorders/environment/MOCK_POD"
)
self._set_env_nocreds()
EnergyRecorder.energy_recorder_api = None
EnergyRecorder.load_config()
- self.assertEquals(EnergyRecorder.energy_recorder_api["auth"], None)
- self.assertEquals(
+ self.assertEqual(EnergyRecorder.energy_recorder_api["auth"], None)
+ self.assertEqual(
EnergyRecorder.energy_recorder_api["uri"],
"http://pod-uri:8888/recorders/environment/MOCK_POD"
)
with self.assertRaises(AssertionError):
EnergyRecorder.energy_recorder_api = None
EnergyRecorder.load_config()
- self.assertEquals(EnergyRecorder.energy_recorder_api, None)
+ self.assertEqual(EnergyRecorder.energy_recorder_api, None)
@mock.patch("xtesting.energy.energy.requests.get",
return_value=API_KO)
self._set_env_creds()
EnergyRecorder.energy_recorder_api = None
EnergyRecorder.load_config()
- self.assertEquals(EnergyRecorder.energy_recorder_api["available"],
- False)
+ self.assertEqual(EnergyRecorder.energy_recorder_api["available"],
+ False)
@mock.patch('xtesting.energy.energy.requests.get',
return_value=RECORDER_OK)