diff --git a/.travis.yml b/.travis.yml index acf2be82..c5c54f77 100644 --- a/.travis.yml +++ b/.travis.yml @@ -13,6 +13,11 @@ cache: python: - "2.6" - "2.7" +matrix: + include: + - python: "2.7" + env: SENDCOVERAGE=1 + # pylint 1.4 does not run under python 2.6 install: - pip install pyOpenSSL @@ -25,8 +30,8 @@ install: script: - pep8 headphones - pyflakes headphones - - nosetests headphones + - nosetests after_success: # coverage stuff: - coveralls + - if [ $SENDCOVERAGE ]; then coveralls; fi diff --git a/headphones/config_test.py b/headphones/config_test.py index f822b08d..cffae098 100644 --- a/headphones/config_test.py +++ b/headphones/config_test.py @@ -6,11 +6,18 @@ from mock import MagicMock import headphones.config from headphones.config import path +def is26(): + if sys.version_info[0]==2 and sys.version_info[1]==6: + return True + return False + class ConfigPathTest(TestCase): def test_path(self): p = path('/tmp') - print path - self.assertIsInstance(p, path) + + #fuckin python 2.6: + if not is26(): + self.assertIsInstance(p, path) self.assertIsNotNone(p) def test_path_call(self): @@ -50,7 +57,10 @@ class ConfigTest(TestCase): """Test creating headphones.Config""" cf = headphones.config.Config('/tmp/notexist') - self.assertIsInstance(cf, headphones.config.Config) + #fuckin python 2.6: + if not is26(): + self.assertIsInstance(cf, headphones.config.Config) + self.assertTrue(True) def test_write(self, config_obj_fabric_mock): """ Test writing config """ @@ -69,4 +79,6 @@ class ConfigTest(TestCase): general_opts_set = conf_mock['General'].__setitem__.call_args_list general_opts_set = map(lambda x: x[0][0], general_opts_set) - self.assertIn('download_dir', general_opts_set, 'There is no download_dir in ConfigObj (submodule of Config)') + #fuckin python 2.6: + if not is26(): + self.assertIn('download_dir', general_opts_set, 'There is no download_dir in ConfigObj (submodule of Config)')