diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index d8a738a1..69e9d743 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -2,9 +2,6 @@ name: Test on: pull_request: - branches: - - master - - maintenance/** push: branches: - master @@ -17,118 +14,42 @@ env: jobs: test: - runs-on: ${{ matrix.os }} strategy: - fail-fast: false matrix: - include: - - os: ubuntu-18.04 - python: "2.7" - toxenv: cp27 - continue-on-error: false - - os: ubuntu-18.04 - python: "3.4" - toxenv: cp34 - continue-on-error: false - - os: ubuntu-18.04 - python: "3.5" - toxenv: cp35 - continue-on-error: false - - os: ubuntu-18.04 - python: "3.6" - toxenv: cp36 - continue-on-error: false - - os: ubuntu-18.04 - python: "3.7" - toxenv: cp37 - continue-on-error: false - - os: ubuntu-18.04 - python: "3.8" - toxenv: cp38 - continue-on-error: false - - os: ubuntu-18.04 - python: "3.9" - toxenv: cp39 - continue-on-error: false - - - os: ubuntu-18.04 - python: "pypy2" - toxenv: pp2 - continue-on-error: false - - os: ubuntu-18.04 - python: "pypy3" - toxenv: pp3 - continue-on-error: false - - - os: ubuntu-20.04 - python: "2.7" - toxenv: cp27 - continue-on-error: false - - os: ubuntu-20.04 - python: "3.5" - toxenv: cp35 - continue-on-error: false - - os: ubuntu-20.04 - python: "pypy2" - toxenv: pp2 - continue-on-error: false - - os: ubuntu-20.04 - python: "pypy3" - toxenv: pp3 - continue-on-error: false - - - os: macos-10.15 - python: "3.5" - toxenv: cp35 - continue-on-error: true - - os: macos-11.0 - python: "3.5" - toxenv: cp35 - continue-on-error: true - - os: windows-2019 - python: "3.5" - toxenv: cp35 - continue-on-error: false - - # 3.10 Alpha - - os: ubuntu-18.04 - python: "3.10.0-alpha.2" - toxenv: "cp310" - continue-on-error: false - - os: macos-11.0 - python: "3.10.0-alpha.2" - toxenv: "cp310" - continue-on-error: true - - os: windows-2019 - python: "3.10.0-alpha.2" - toxenv: "cp310" - continue-on-error: true - + python-version: ["3.7", "3.8", "3.9", "3.10", "3.11", "3.12", "pypy3.9", "pypy3.10"] + os: [windows-latest, ubuntu-latest, macos-latest] + fail-fast: false + runs-on: ${{ matrix.os }} steps: - - uses: actions/checkout@v2 - - name: Setup python - uses: actions/setup-python@v2 - with: - python-version: ${{ matrix.python }} - - name: Install - run: pip install -q -r "tox-requirements.txt" - - name: Run tests - continue-on-error: ${{ matrix.continue-on-error }} - env: - TOXENV: ${{ matrix.toxenv }} - run: tox -v + - uses: actions/checkout@v4 + - name: Setup python + uses: actions/setup-python@v4 + with: + python-version: ${{ matrix.python-version }} + - name: Install + run: | + pip install -e . + pip install -r "test_requirements.txt" + pip --version + - name: Run tests with unittest + run: | + coverage run --branch -m unittest discover -v -t . haas + - name: Run tests with haas + run: | + python -m haas haas + - name: Print coverage report + run: | + coverage report lint: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v2 - - name: Setup python - uses: actions/setup-python@v2 - with: - python-version: "3.7" - - name: Install - run: pip install -q -r "tox-requirements.txt" - - name: Run tests - env: - TOXENV: flake8 - run: tox -v + - uses: actions/checkout@v4 + - name: Set up Python 3.8 + uses: actions/setup-python@v4 + with: + python-version: 3.8 + - name: Install flake8 + run: python -m pip install flake8 + - name: Lint codebase + run: python -m flake8 haas diff --git a/haas/plugins/discoverer.py b/haas/plugins/discoverer.py index 74a5ca09..ca2f3de5 100644 --- a/haas/plugins/discoverer.py +++ b/haas/plugins/discoverer.py @@ -7,6 +7,9 @@ from __future__ import absolute_import, unicode_literals from fnmatch import fnmatch +from importlib import import_module +from os import getcwd +from pathlib import Path import logging import os import sys @@ -16,7 +19,6 @@ from haas.module_import_error import ModuleImportError from haas.suite import find_test_cases from haas.testing import unittest -from haas.utils import get_module_by_name from .i_discoverer_plugin import IDiscovererPlugin logger = logging.getLogger(__name__) @@ -41,9 +43,11 @@ def test_error(self): def get_relpath(top_level_directory, fullpath): - normalized = os.path.normpath(fullpath) - relpath = os.path.relpath(normalized, top_level_directory) - if os.path.isabs(relpath) or relpath.startswith('..'): + top_level = Path(top_level_directory).resolve() + normalized = Path(fullpath).resolve() + try: + relpath = str(normalized.relative_to(top_level)) + except ValueError: raise ValueError('Path not within project: {0}'.format(fullpath)) return relpath @@ -77,7 +81,7 @@ def find_module_by_name(full_name): module_attributes = [] while True: try: - module = get_module_by_name(module_name) + module = import_module(module_name) except ImportError: if '.' in module_name: module_name, attribute = module_name.rsplit('.', 1) @@ -365,7 +369,7 @@ def _load_from_file(self, filepath, top_level_directory): module_name = get_module_name(top_level_directory, filepath) logger.debug('Loading tests from %r', module_name) try: - module = get_module_by_name(module_name) + module = import_module(module_name) except Exception: test = _create_import_error_test(module_name) else: @@ -421,7 +425,7 @@ def discover_filtered_tests(self, filter_name, top_level_directory=None, """ if top_level_directory is None: top_level_directory = find_top_level_directory( - os.getcwd()) + getcwd()) logger.debug('Discovering filtered tests: filter_name=%r, ' 'top_level_directory=%r, pattern=%r', top_level_directory, diff --git a/haas/plugins/i_discoverer_plugin.py b/haas/plugins/i_discoverer_plugin.py index 7a17ce3c..dc2e0bee 100644 --- a/haas/plugins/i_discoverer_plugin.py +++ b/haas/plugins/i_discoverer_plugin.py @@ -8,13 +8,10 @@ from abc import ABCMeta, abstractmethod -from six import add_metaclass - from haas.utils import abstractclassmethod -@add_metaclass(ABCMeta) -class IDiscovererPlugin(object): +class IDiscovererPlugin(object, metaclass=ABCMeta): @abstractclassmethod def from_args(cls, args, arg_prefix, loader): diff --git a/haas/plugins/i_hook_plugin.py b/haas/plugins/i_hook_plugin.py index e3826f63..fa16238b 100644 --- a/haas/plugins/i_hook_plugin.py +++ b/haas/plugins/i_hook_plugin.py @@ -8,13 +8,10 @@ import abc -from six import add_metaclass - from haas.utils import abstractclassmethod -@add_metaclass(abc.ABCMeta) -class IHookPlugin(object): +class IHookPlugin(object, metaclass=abc.ABCMeta): @abc.abstractmethod def setup(self): # pragma: no cover diff --git a/haas/plugins/i_result_handler_plugin.py b/haas/plugins/i_result_handler_plugin.py index 6a20913d..80c15512 100644 --- a/haas/plugins/i_result_handler_plugin.py +++ b/haas/plugins/i_result_handler_plugin.py @@ -8,13 +8,10 @@ from abc import ABCMeta, abstractmethod -from six import add_metaclass - from haas.utils import abstractclassmethod -@add_metaclass(ABCMeta) -class IResultHandlerPlugin(object): +class IResultHandlerPlugin(object, metaclass=ABCMeta): @abstractclassmethod def from_args(cls, args, name, dest_prefix, test_count): diff --git a/haas/plugins/i_runner_plugin.py b/haas/plugins/i_runner_plugin.py index 25d134c3..65e3de81 100644 --- a/haas/plugins/i_runner_plugin.py +++ b/haas/plugins/i_runner_plugin.py @@ -8,13 +8,10 @@ import abc -from six import add_metaclass - from haas.utils import abstractclassmethod -@add_metaclass(abc.ABCMeta) -class IRunnerPlugin(object): +class IRunnerPlugin(object, metaclass=abc.ABCMeta): @abstractclassmethod def from_args(cls, args, arg_prefix): diff --git a/haas/plugins/parallel_runner.py b/haas/plugins/parallel_runner.py index 803e0cb4..d1d13b93 100644 --- a/haas/plugins/parallel_runner.py +++ b/haas/plugins/parallel_runner.py @@ -1,10 +1,10 @@ +from importlib import import_module from multiprocessing import Pool import time from haas.module_import_error import ModuleImportError from haas.suite import find_test_cases from haas.result import ResultCollector -from haas.utils import get_module_by_name from .i_result_handler_plugin import IResultHandlerPlugin from .runner import BaseTestRunner @@ -82,7 +82,7 @@ def from_args(cls, args, arg_prefix): initializer = None else: module_name, initializer_name = initializer_spec.rsplit('.', 1) - init_module = get_module_by_name(module_name) + init_module = import_module(module_name) initializer = getattr(init_module, initializer_name) return cls(process_count=args.processes, initializer=initializer, maxtasksperchild=args.process_max_tasks) diff --git a/haas/plugins/tests/test_discoverer.py b/haas/plugins/tests/test_discoverer.py index 0314f8a5..929ed5d1 100644 --- a/haas/plugins/tests/test_discoverer.py +++ b/haas/plugins/tests/test_discoverer.py @@ -20,6 +20,7 @@ from haas.module_import_error import ModuleImportError from haas.suite import find_test_cases, TestSuite from haas.utils import cd +from haas.plugins import discoverer from ..discoverer import ( Discoverer, filter_test_suite, @@ -451,7 +452,7 @@ def test_discover_class(self): def test_discover_no_top_level(self): getcwd = mock.Mock() getcwd.return_value = self.tmpdir - with mock.patch.object(os, 'getcwd', getcwd): + with mock.patch.object(discoverer, 'getcwd', getcwd): suite = self.discoverer.discover( 'TestCase', ) diff --git a/haas/plugins/tests/test_result_handlers.py b/haas/plugins/tests/test_result_handlers.py index b1c98af1..ff2aeb1b 100644 --- a/haas/plugins/tests/test_result_handlers.py +++ b/haas/plugins/tests/test_result_handlers.py @@ -1,7 +1,7 @@ from datetime import datetime, timedelta import statistics -from six.moves import StringIO +from io import StringIO from haas.result import TestResult, TestCompletionStatus, TestDuration from haas.testing import unittest @@ -53,7 +53,7 @@ def test_output_stop_test_run_success(self, stderr): output = stderr.getvalue() output_start = '\n\nTest timing report\n' + handler.separator2 self.assertTrue(output.startswith(output_start)) - self.assertRegexpMatches( + self.assertRegex( output.replace('\n', ''), r'--+.*?00:10\.123 test_method \(') @mock.patch('time.ctime') @@ -234,7 +234,7 @@ def test_output_with_error_on_stop_test_run(self, stderr): output = stderr.getvalue() output_start = '\n\nTest timing report\n' + handler.separator2 self.assertTrue(output.startswith(output_start)) - self.assertRegexpMatches( + self.assertRegex( output.replace('\n', ''), r'--+.*?1543:00:12\.234 test_method \(') @mock.patch('sys.stderr', new_callable=StringIO) @@ -261,7 +261,7 @@ def test_output_with_failure_on_stop_test_run(self, stderr): output = stderr.getvalue() output_start = '\n\nTest timing report\n' + handler.separator2 self.assertTrue(output.startswith(output_start)) - self.assertRegexpMatches( + self.assertRegex( output.replace('\n', ''), r'--+.*?1:01:14\.567 test_method \(') def _calculate_statistics(self, test_durations): @@ -341,7 +341,7 @@ class Case(_test_cases.TestCase): output = stderr.getvalue() output_start = '\n\nTest timing report\n' + handler.separator2 self.assertTrue(output.startswith(output_start)) - self.assertRegexpMatches( + self.assertRegex( output.replace('\n', ''), r'--+.*?00:09\.123 test_method \(') self.assertIn(expected_stats, output) diff --git a/haas/result.py b/haas/result.py index de1a3e10..1a3a834f 100644 --- a/haas/result.py +++ b/haas/result.py @@ -14,8 +14,7 @@ import traceback import warnings -import six -from six.moves import StringIO +from io import StringIO from .error_holder import ErrorHolder @@ -65,7 +64,7 @@ def _count_relevant_tb_levels(tb): def _decode(line, encoding): - if isinstance(line, six.text_type): + if isinstance(line, str): return line try: return line.decode(encoding) diff --git a/haas/tests/builder.py b/haas/tests/builder.py index a2c3f9bf..cd44b784 100644 --- a/haas/tests/builder.py +++ b/haas/tests/builder.py @@ -10,13 +10,10 @@ import os import textwrap -from six import add_metaclass - from ..testing import unittest -@add_metaclass(abc.ABCMeta) -class Importable(object): +class Importable(object, metaclass=abc.ABCMeta): def __init__(self, name, contents=()): self.name = name diff --git a/haas/tests/test_buffering.py b/haas/tests/test_buffering.py index f279a349..79f4edde 100644 --- a/haas/tests/test_buffering.py +++ b/haas/tests/test_buffering.py @@ -9,7 +9,7 @@ from datetime import datetime, timedelta import sys -from six.moves import StringIO +from io import StringIO from haas.tests.compat import mock from ..plugins.i_result_handler_plugin import IResultHandlerPlugin diff --git a/haas/tests/test_loader.py b/haas/tests/test_loader.py index afe0bf55..a64fbba4 100644 --- a/haas/tests/test_loader.py +++ b/haas/tests/test_loader.py @@ -8,8 +8,6 @@ import unittest as python_unittest -import six - from haas.testing import unittest from . import _test_cases @@ -111,8 +109,7 @@ def assertSuiteClasses(self, suite, klass): def test_find_all_cases_in_module(self): cases = self.loader.get_test_cases_from_module(_test_cases) - six.assertCountEqual( - self, + self.assertCountEqual( cases, [_test_cases.TestCase, _test_cases.PythonTestCase]) def test_load_all_cases_in_module(self): diff --git a/haas/tests/test_parallel_runner.py b/haas/tests/test_parallel_runner.py index 6590fd38..d190b6ca 100644 --- a/haas/tests/test_parallel_runner.py +++ b/haas/tests/test_parallel_runner.py @@ -2,7 +2,7 @@ from datetime import datetime, timedelta import time -from six.moves import StringIO +from io import StringIO from ..plugins.discoverer import _create_import_error_test from ..plugins.parallel_runner import ChildResultHandler, ParallelTestRunner diff --git a/haas/tests/test_quiet_result_handler.py b/haas/tests/test_quiet_result_handler.py index 556197ef..3bd4f103 100644 --- a/haas/tests/test_quiet_result_handler.py +++ b/haas/tests/test_quiet_result_handler.py @@ -8,7 +8,7 @@ from datetime import datetime, timedelta -from six.moves import StringIO +from io import StringIO from ..plugins.result_handler import QuietTestResultHandler from ..result import ( @@ -46,7 +46,7 @@ def test_output_stop_test_run(self, stderr): output = stderr.getvalue() self.assertTrue(output.startswith('\n' + handler.separator2)) self.assertTrue(output.endswith('OK\n')) - self.assertRegexpMatches( + self.assertRegex( output.replace('\n', ''), r'--+.*?Ran 0 tests.*?OK') @mock.patch('sys.stderr', new_callable=StringIO) @@ -226,7 +226,7 @@ def test_no_output_with_error_on_stop_test_run(self, stderr): output = stderr.getvalue().replace('\n', '') description = handler.get_test_description( case,).replace('(', r'\(').replace(')', r'\)') - self.assertRegexpMatches( + self.assertRegex( output, '{0}.*?Traceback.*?RuntimeError'.format( description)) @@ -254,7 +254,7 @@ def test_no_output_with_failure_on_stop_test_run(self, stderr): output = stderr.getvalue().replace('\n', '') description = handler.get_test_description( case,).replace('(', r'\(').replace(')', r'\)').replace('\n', '') - self.assertRegexpMatches( + self.assertRegex( output, '{0}.*?Traceback.*?AssertionError'.format( description)) # The contents of unittest.TestCase should not be in the traceback diff --git a/haas/tests/test_standard_result_handler.py b/haas/tests/test_standard_result_handler.py index 84e1658c..69f6a255 100644 --- a/haas/tests/test_standard_result_handler.py +++ b/haas/tests/test_standard_result_handler.py @@ -8,7 +8,7 @@ from datetime import datetime, timedelta -from six.moves import StringIO +from io import StringIO from ..plugins.result_handler import StandardTestResultHandler from ..result import ( @@ -46,7 +46,7 @@ def test_output_stop_test_run(self, stderr): output = stderr.getvalue() self.assertTrue(output.startswith('\n' + handler.separator2)) self.assertTrue(output.endswith('OK\n')) - self.assertRegexpMatches( + self.assertRegex( output.replace('\n', ''), r'--+.*?Ran 0 tests.*?OK') @mock.patch('sys.stderr', new_callable=StringIO) @@ -226,7 +226,7 @@ def test_no_output_with_error_on_stop_test_run(self, stderr): output = stderr.getvalue().replace('\n', '') description = handler.get_test_description( case).replace('(', r'\(').replace(')', r'\)') - self.assertRegexpMatches( + self.assertRegex( output, '{0}.*?Traceback.*?RuntimeError'.format( description)) @@ -254,7 +254,7 @@ def test_no_output_with_failure_on_stop_test_run(self, stderr): output = stderr.getvalue().replace('\n', '') description = handler.get_test_description( case).replace('(', r'\(').replace(')', r'\)').replace('\n', '') - self.assertRegexpMatches( + self.assertRegex( output, '{0}.*?Traceback.*?AssertionError'.format( description)) # The contents of unittest.TestCase should not be in the traceback diff --git a/haas/tests/test_test_duration_ordering.py b/haas/tests/test_test_duration_ordering.py index 7f0059ec..83a97698 100644 --- a/haas/tests/test_test_duration_ordering.py +++ b/haas/tests/test_test_duration_ordering.py @@ -9,8 +9,6 @@ from datetime import datetime, timedelta import sys -import six - from ..result import TestDuration from ..testing import unittest @@ -76,11 +74,11 @@ def test_equality(self): self.assertEqual(duration1, duration2) self.assertLessEqual(duration1, duration2) self.assertGreaterEqual(duration1, duration2) - with six.assertRaisesRegex( - self, self.failureException, 'not less than'): + with self.assertRaisesRegex( + self.failureException, 'not less than'): self.assertLess(duration1, duration2) - with six.assertRaisesRegex( - self, self.failureException, 'not greater than'): + with self.assertRaisesRegex( + self.failureException, 'not greater than'): self.assertGreater(duration1, duration2) self.assertNotEqual(duration1, object()) @@ -99,11 +97,11 @@ def test_equality(self): self.assertEqual(duration1, duration2) self.assertLessEqual(duration1, duration2) self.assertGreaterEqual(duration1, duration2) - with six.assertRaisesRegex( - self, self.failureException, 'not less than'): + with self.assertRaisesRegex( + self.failureException, 'not less than'): self.assertLess(duration1, duration2) - with six.assertRaisesRegex( - self, self.failureException, 'not greater than'): + with self.assertRaisesRegex( + self.failureException, 'not greater than'): self.assertGreater(duration1, duration2) def test_lessthan(self): @@ -122,11 +120,11 @@ def test_lessthan(self): self.assertNotEqual(duration1, duration2) self.assertLess(duration1, duration2) self.assertLessEqual(duration1, duration2) - with six.assertRaisesRegex( - self, self.failureException, 'not greater than or equal to'): + with self.assertRaisesRegex( + self.failureException, 'not greater than or equal to'): self.assertGreaterEqual(duration1, duration2) - with six.assertRaisesRegex( - self, self.failureException, 'not greater than'): + with self.assertRaisesRegex( + self.failureException, 'not greater than'): self.assertGreater(duration1, duration2) def test_greaterthan(self): @@ -145,9 +143,9 @@ def test_greaterthan(self): self.assertNotEqual(duration1, duration2) self.assertGreater(duration1, duration2) self.assertGreaterEqual(duration1, duration2) - with six.assertRaisesRegex( - self, self.failureException, 'not less than or equal to'): + with self.assertRaisesRegex( + self.failureException, 'not less than or equal to'): self.assertLessEqual(duration1, duration2) - with six.assertRaisesRegex( - self, self.failureException, 'not less than'): + with self.assertRaisesRegex( + self.failureException, 'not less than'): self.assertLess(duration1, duration2) diff --git a/haas/tests/test_verbose_result_handler.py b/haas/tests/test_verbose_result_handler.py index b136a1e5..a10b3491 100644 --- a/haas/tests/test_verbose_result_handler.py +++ b/haas/tests/test_verbose_result_handler.py @@ -9,7 +9,7 @@ from datetime import datetime, timedelta from time import ctime -from six.moves import StringIO +from io import StringIO from ..plugins.result_handler import VerboseTestResultHandler from ..result import ( @@ -47,7 +47,7 @@ def test_no_output_stop_test_run(self, stderr): output = stderr.getvalue() self.assertTrue(output.startswith('\n' + handler.separator2)) self.assertTrue(output.endswith('OK\n')) - self.assertRegexpMatches( + self.assertRegex( output.replace('\n', ''), r'--+.*?Ran 0 tests.*?OK') @mock.patch('time.ctime') @@ -232,7 +232,7 @@ def test_output_with_error_on_stop_test_run(self, stderr): output = stderr.getvalue().replace('\n', '') description = handler.get_test_description( case).replace('(', r'\(').replace(')', r'\)') - self.assertRegexpMatches( + self.assertRegex( output, '{0}.*?Traceback.*?RuntimeError'.format( description)) @@ -260,7 +260,7 @@ def test_output_with_failure_on_stop_test_run(self, stderr): output = stderr.getvalue().replace('\n', '') description = handler.get_test_description( case).replace('(', r'\(').replace(')', r'\)').replace('\n', '') - self.assertRegexpMatches( + self.assertRegex( output, '{0}.*?Traceback.*?AssertionError'.format( description)) # The contents of unittest.TestCase should not be in the traceback diff --git a/haas/utils.py b/haas/utils.py index 93a5057b..677922f7 100644 --- a/haas/utils.py +++ b/haas/utils.py @@ -8,10 +8,8 @@ import logging import os -import sys import re - -import six +import sys import haas @@ -40,18 +38,6 @@ def configure_logging(level): logging.getLevelName(actual_level)) -if six.PY2: - def get_module_by_name(name): - """Import a module and return the imported module object. - - """ - __import__(name) - return sys.modules[name] -else: - import importlib - get_module_by_name = importlib.import_module - - UNCAMELCASE_FIRST_PASS = re.compile( r'(?P.)(?P[A-Z]+)') UNCAMELCASE_SECOND_PASS = re.compile( diff --git a/setup.py b/setup.py index 3bcff0d7..f250d729 100644 --- a/setup.py +++ b/setup.py @@ -5,7 +5,6 @@ # This software may be modified and distributed under the terms # of the 3-clause BSD license. See the LICENSE.txt file for details. import os -import sys import subprocess from setuptools import setup @@ -105,21 +104,11 @@ def write_version_py(filename='haas/_version.py'): if __name__ == "__main__": - install_requires = ['six'] - common_requires = ['enum34', 'statistics'] - py26_requires = [ - 'stevedore >= 1.0.0, < 1.10.0', - 'unittest2', - 'argparse', - 'ordereddict'] + common_requires - py34_requires = ['stevedore >= 1.0.0, < 1.12.0'] - py33_requires = py34_requires + common_requires - if sys.version_info < (2, 7): - install_requires += py26_requires - elif sys.version_info < (3, 4): - install_requires += py33_requires - else: - install_requires = py34_requires + install_requires = [ + 'enum34', + 'statistics', + 'stevedore >= 3.5.2, < 5.0.0', + ] write_version_py() from haas import __version__ @@ -143,13 +132,14 @@ def write_version_py(filename='haas/_version.py'): 'Operating System :: POSIX', 'Operating System :: Unix', 'Programming Language :: Python', - 'Programming Language :: Python :: 2', - 'Programming Language :: Python :: 2.7', 'Programming Language :: Python :: 3', - 'Programming Language :: Python :: 3.4', - 'Programming Language :: Python :: 3.5', - 'Programming Language :: Python :: 3.6', + 'Programming Language :: Python :: 3 :: Only', 'Programming Language :: Python :: 3.7', + 'Programming Language :: Python :: 3.8', + 'Programming Language :: Python :: 3.9', + 'Programming Language :: Python :: 3.10', + 'Programming Language :: Python :: 3.11', + 'Programming Language :: Python :: 3.12', 'Topic :: Software Development', 'Topic :: Software Development :: Testing', ], @@ -179,13 +169,4 @@ def write_version_py(filename='haas/_version.py'): 'timing = haas.plugins.result_handler:TimingResultHandler', ] }, - extras_require={ - ':python_version=="2.6"': py26_requires, - ':python_version=="2.7"': py33_requires, - ':python_version=="3.3"': py33_requires, - ':python_version=="3.4"': py34_requires, - ':python_version=="3.5"': py34_requires, - ':python_version=="3.6"': py34_requires, - ':python_version=="3.7"': py34_requires, - }, ) diff --git a/test_requirements.txt b/test_requirements.txt index f345fa94..ff0b4f14 100644 --- a/test_requirements.txt +++ b/test_requirements.txt @@ -1,5 +1,4 @@ coverage unittest2; python_version == '2.6' mock; python_version < '3.3' -six testfixtures diff --git a/tox.ini b/tox.ini index 2cab8678..1d0c75dc 100644 --- a/tox.ini +++ b/tox.ini @@ -1,5 +1,5 @@ [tox] -envlist = cp{27,34,35,36,37,38,39,310},pp{2,3},flake8 +envlist = cp{27,34,35,36,37,38,39,310,311,312},pp{2,3},flake8 minversion=2.7 [testenv] @@ -20,7 +20,9 @@ basepython = cp37: {env:TOXPY37:python3.7} cp38: {env:TOXPY38:python3.8} cp39: {env:TOXPY38:python3.9} - cp310: {env:TOXPY38:python3.10} + cp310: {env:TOXPY310:python3.10} + cp311: {env:TOXPY311:python3.12} + cp312: {env:TOXPY312:python3.12} pp2: {env:TOXPYPY:pypy} pp3: {env:TOXPYPY3:pypy3}