mirror of
https://github.com/adrienverge/yamllint.git
synced 2025-02-25 18:55:20 -06:00
Drop support for EOL Python 2.6
This commit is contained in:
parent
8bdddf6e89
commit
c281d48507
13
.travis.yml
13
.travis.yml
@ -1,26 +1,19 @@
|
|||||||
---
|
---
|
||||||
language: python
|
language: python
|
||||||
python:
|
python:
|
||||||
- 2.6
|
|
||||||
- 2.7
|
- 2.7
|
||||||
- 3.4
|
- 3.4
|
||||||
- 3.5
|
- 3.5
|
||||||
- 3.6
|
- 3.6
|
||||||
- nightly
|
- nightly
|
||||||
install:
|
install:
|
||||||
- pip install pyyaml flake8 flake8-import-order
|
- pip install pyyaml coveralls flake8 flake8-import-order
|
||||||
- if [[ $TRAVIS_PYTHON_VERSION == 2.6 ]]; then pip install unittest2; fi
|
|
||||||
- if [[ $TRAVIS_PYTHON_VERSION != 2.6 ]]; then pip install coveralls; fi
|
|
||||||
- if [[ $TRAVIS_PYTHON_VERSION != 2* ]]; then pip install sphinx; fi
|
- if [[ $TRAVIS_PYTHON_VERSION != 2* ]]; then pip install sphinx; fi
|
||||||
- pip install .
|
- pip install .
|
||||||
script:
|
script:
|
||||||
- if [[ $TRAVIS_PYTHON_VERSION != 2.6 ]]; then flake8 .; fi
|
- flake8 .
|
||||||
- yamllint --strict $(git ls-files '*.yaml' '*.yml')
|
- yamllint --strict $(git ls-files '*.yaml' '*.yml')
|
||||||
- if [[ $TRAVIS_PYTHON_VERSION != 2.6 ]]; then
|
- coverage run --source=yamllint setup.py test
|
||||||
coverage run --source=yamllint setup.py test;
|
|
||||||
else
|
|
||||||
python setup.py test;
|
|
||||||
fi
|
|
||||||
- if [[ $TRAVIS_PYTHON_VERSION != 2* ]]; then
|
- if [[ $TRAVIS_PYTHON_VERSION != 2* ]]; then
|
||||||
python setup.py build_sphinx;
|
python setup.py build_sphinx;
|
||||||
fi
|
fi
|
||||||
|
@ -16,12 +16,7 @@
|
|||||||
|
|
||||||
import os
|
import os
|
||||||
import tempfile
|
import tempfile
|
||||||
import sys
|
import unittest
|
||||||
try:
|
|
||||||
assert sys.version_info >= (2, 7)
|
|
||||||
import unittest
|
|
||||||
except AssertionError:
|
|
||||||
import unittest2 as unittest
|
|
||||||
|
|
||||||
import yaml
|
import yaml
|
||||||
|
|
||||||
|
@ -15,11 +15,7 @@
|
|||||||
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
|
||||||
import sys
|
import sys
|
||||||
try:
|
import unittest
|
||||||
assert sys.version_info >= (2, 7)
|
|
||||||
import unittest
|
|
||||||
except AssertionError:
|
|
||||||
import unittest2 as unittest
|
|
||||||
|
|
||||||
from tests.common import RuleTestCase
|
from tests.common import RuleTestCase
|
||||||
|
|
||||||
|
@ -24,18 +24,13 @@ import os
|
|||||||
import pty
|
import pty
|
||||||
import shutil
|
import shutil
|
||||||
import sys
|
import sys
|
||||||
try:
|
import unittest
|
||||||
assert sys.version_info >= (2, 7)
|
|
||||||
import unittest
|
|
||||||
except AssertionError:
|
|
||||||
import unittest2 as unittest
|
|
||||||
|
|
||||||
from tests.common import build_temp_workspace
|
from tests.common import build_temp_workspace
|
||||||
|
|
||||||
from yamllint import cli
|
from yamllint import cli
|
||||||
|
|
||||||
|
|
||||||
@unittest.skipIf(sys.version_info < (2, 7), 'Python 2.6 not supported')
|
|
||||||
class CommandLineTestCase(unittest.TestCase):
|
class CommandLineTestCase(unittest.TestCase):
|
||||||
@classmethod
|
@classmethod
|
||||||
def setUpClass(cls):
|
def setUpClass(cls):
|
||||||
|
@ -21,11 +21,7 @@ except ImportError:
|
|||||||
import os
|
import os
|
||||||
import shutil
|
import shutil
|
||||||
import sys
|
import sys
|
||||||
try:
|
import unittest
|
||||||
assert sys.version_info >= (2, 7)
|
|
||||||
import unittest
|
|
||||||
except AssertionError:
|
|
||||||
import unittest2 as unittest
|
|
||||||
|
|
||||||
from tests.common import build_temp_workspace
|
from tests.common import build_temp_workspace
|
||||||
|
|
||||||
@ -338,7 +334,6 @@ class IgnorePathConfigTestCase(unittest.TestCase):
|
|||||||
|
|
||||||
shutil.rmtree(cls.wd)
|
shutil.rmtree(cls.wd)
|
||||||
|
|
||||||
@unittest.skipIf(sys.version_info < (2, 7), 'Python 2.6 not supported')
|
|
||||||
def test_run_with_ignored_path(self):
|
def test_run_with_ignored_path(self):
|
||||||
sys.stdout = StringIO()
|
sys.stdout = StringIO()
|
||||||
with self.assertRaises(SystemExit):
|
with self.assertRaises(SystemExit):
|
||||||
|
@ -15,12 +15,7 @@
|
|||||||
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
|
||||||
import io
|
import io
|
||||||
import sys
|
import unittest
|
||||||
try:
|
|
||||||
assert sys.version_info >= (2, 7)
|
|
||||||
import unittest
|
|
||||||
except AssertionError:
|
|
||||||
import unittest2 as unittest
|
|
||||||
|
|
||||||
from yamllint.config import YamlLintConfig
|
from yamllint.config import YamlLintConfig
|
||||||
from yamllint import linter
|
from yamllint import linter
|
||||||
|
@ -19,17 +19,12 @@ import shutil
|
|||||||
import subprocess
|
import subprocess
|
||||||
import tempfile
|
import tempfile
|
||||||
import sys
|
import sys
|
||||||
try:
|
import unittest
|
||||||
assert sys.version_info >= (2, 7)
|
|
||||||
import unittest
|
|
||||||
except AssertionError:
|
|
||||||
import unittest2 as unittest
|
|
||||||
|
|
||||||
|
|
||||||
PYTHON = sys.executable or 'python'
|
PYTHON = sys.executable or 'python'
|
||||||
|
|
||||||
|
|
||||||
@unittest.skipIf(sys.version_info < (2, 7), 'Python 2.6 not supported')
|
|
||||||
class ModuleTestCase(unittest.TestCase):
|
class ModuleTestCase(unittest.TestCase):
|
||||||
def setUp(self):
|
def setUp(self):
|
||||||
self.wd = tempfile.mkdtemp(prefix='yamllint-tests-')
|
self.wd = tempfile.mkdtemp(prefix='yamllint-tests-')
|
||||||
|
@ -14,12 +14,7 @@
|
|||||||
# You should have received a copy of the GNU General Public License
|
# You should have received a copy of the GNU General Public License
|
||||||
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
|
||||||
import sys
|
import unittest
|
||||||
try:
|
|
||||||
assert sys.version_info >= (2, 7)
|
|
||||||
import unittest
|
|
||||||
except AssertionError:
|
|
||||||
import unittest2 as unittest
|
|
||||||
|
|
||||||
import yaml
|
import yaml
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user