Skip to content

Commit

Permalink
Python 2.6 broke. I am taking this as a chance to drop support for it
Browse files Browse the repository at this point in the history
and python3.3 but will be supported pypy3 and python3.6
  • Loading branch information
Bachmann1234 committed Nov 14, 2017
1 parent f4a4799 commit 75efbba
Show file tree
Hide file tree
Showing 15 changed files with 28 additions and 39 deletions.
16 changes: 10 additions & 6 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,14 +1,18 @@
language: python
matrix:
include:
- python: 2.7
env: TOXENV=py27
- python: 3.4
env: TOXENV=py34
- python: 3.5
env: TOXENV=py35
env:
- TOXENV=py26
- TOXENV=py27
- TOXENV=py33
- TOXENV=py34
- TOXENV=pypy
- python: 3.6
env: TOXENV=py36
- python: pypy
env: TOXENV=pypy
- python: pypy3
env: TOXENV=pypy3
install:
- travis_retry pip install coveralls tox
script:
Expand Down
2 changes: 1 addition & 1 deletion README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -263,7 +263,7 @@ For example, setting up python 3:
pyvenv venv
source venv/bin/activate
pip install -r test-requirements-py27-py3.txt
pip install -r test-requirements.txt
Special Thanks
Expand Down
6 changes: 0 additions & 6 deletions diff_cover/tests/helpers.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,19 +2,13 @@
Test helper functions.
"""
import random
import sys

import io
import six
import os.path
import difflib
from nose.tools import ok_

if sys.version_info[:2] <= (2, 6):
import unittest2 as unittest
else:
import unittest

HUNK_BUFFER = 2
MAX_LINE_LENGTH = 300
LINE_STRINGS = ['test', '+ has a plus sign', '- has a minus sign']
Expand Down
4 changes: 2 additions & 2 deletions diff_cover/tests/test_args.py
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
from __future__ import unicode_literals
import contextlib
import sys
from mock import Mock, patch
from mock import patch
from diff_cover.tool import parse_coverage_args, parse_quality_args, main
from diff_cover.tests.helpers import unittest
import unittest


@contextlib.contextmanager
Expand Down
3 changes: 2 additions & 1 deletion diff_cover/tests/test_diff_reporter.py
Original file line number Diff line number Diff line change
@@ -1,10 +1,11 @@
# -*- coding: utf-8 -*-
from __future__ import unicode_literals
import mock
import unittest
from textwrap import dedent
from diff_cover.diff_reporter import GitDiffReporter
from diff_cover.git_diff import GitDiffTool, GitDiffError
from diff_cover.tests.helpers import line_numbers, git_diff_output, unittest
from diff_cover.tests.helpers import line_numbers, git_diff_output


class GitDiffReporterTest(unittest.TestCase):
Expand Down
4 changes: 2 additions & 2 deletions diff_cover/tests/test_git_diff.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@
import mock

from diff_cover.command_runner import CommandError
from diff_cover.git_diff import GitDiffTool, GitDiffError
from diff_cover.tests.helpers import unittest
from diff_cover.git_diff import GitDiffTool
import unittest


class TestGitDiffTool(unittest.TestCase):
Expand Down
2 changes: 1 addition & 1 deletion diff_cover/tests/test_git_path.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
from __future__ import unicode_literals
import mock
from diff_cover.git_path import GitPathTool
from diff_cover.tests.helpers import unittest
import unittest


class TestGitPathTool(unittest.TestCase):
Expand Down
2 changes: 1 addition & 1 deletion diff_cover/tests/test_integration.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
from collections import defaultdict
from io import BytesIO
from subprocess import Popen
from diff_cover.tests.helpers import unittest
import unittest
import io
import six

Expand Down
3 changes: 2 additions & 1 deletion diff_cover/tests/test_report_generator.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,9 @@
StringReportGenerator, TemplateReportGenerator
)
from diff_cover.tests.helpers import (
load_fixture, assert_long_str_equal, unittest
load_fixture, assert_long_str_equal
)
import unittest
from diff_cover.violationsreporters.violations_reporter import BaseViolationReporter, Violation


Expand Down
3 changes: 2 additions & 1 deletion diff_cover/tests/test_snippets.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,9 @@
from pygments.token import Token
from diff_cover.snippets import Snippet
from diff_cover.tests.helpers import load_fixture,\
fixture_path, assert_long_str_equal, unittest
fixture_path, assert_long_str_equal
import six
import unittest


class SnippetTest(unittest.TestCase):
Expand Down
2 changes: 1 addition & 1 deletion diff_cover/tests/test_violations_reporter.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
from diff_cover.violationsreporters import base

from diff_cover.command_runner import CommandError, run_command_for_code
from diff_cover.tests.helpers import unittest
import unittest
from diff_cover.violationsreporters.base import QualityReporter
from diff_cover.violationsreporters.violations_reporter import (
XmlCoverageReporter, Violation, pycodestyle_driver, pyflakes_driver,
Expand Down
4 changes: 0 additions & 4 deletions requirements/test-requirements-py26.txt

This file was deleted.

4 changes: 0 additions & 4 deletions requirements/test-requirements-py27-py3.txt

This file was deleted.

2 changes: 2 additions & 0 deletions requirements/test-requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -5,4 +5,6 @@ coverage
pycodestyle
flake8
pyflakes
pylint
pydocstyle
-r requirements.txt
10 changes: 2 additions & 8 deletions tox.ini
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
[tox]
envlist = py26, py27, py33, py34, py35, pypy
envlist = py27, py34, py35, py36, pypy, pypy3

[testenv]
whitelist_externals =
/usr/bin/git
deps =
-r{toxinidir}/requirements/test-requirements-py27-py3.txt
-r{toxinidir}/requirements/test-requirements.txt
commands =
coverage run -m nose {posargs}
coverage xml
Expand All @@ -15,12 +15,6 @@ commands =
diff-quality --violation=pyflakes
diff-quality --violation=pylint

[testenv:py26]
deps =
-r{toxinidir}/requirements/test-requirements-py26.txt
argparse
unittest2

[testenv:py27]
commands =
{[testenv]commands}
Expand Down

0 comments on commit 75efbba

Please sign in to comment.