Stop testing 3.7, add 3.11

This removes our reliance on asynctest and reduces the maintenance
burden slightly.  We still support 3.7, just removing explicit testing
of it.
This commit is contained in:
Dave Shawley 2023-07-27 09:17:38 -04:00
parent a63733dcad
commit b64cd0cbde
No known key found for this signature in database
GPG key ID: F41A8A99298F8EED
5 changed files with 8 additions and 12 deletions

View file

@ -12,7 +12,7 @@ jobs:
runs-on: ubuntu-latest runs-on: ubuntu-latest
strategy: strategy:
matrix: matrix:
python-version: [3.7, 3.8, 3.9] python-version: [3.8, 3.9, 3.11]
steps: steps:
- uses: actions/checkout@v2 - uses: actions/checkout@v2
- name: Install python ${{ matrix.python-version }} - name: Install python ${{ matrix.python-version }}

View file

@ -1,6 +1,7 @@
Next Next
---- ----
- Removed debug-level logging of processing metric - Removed debug-level logging of processing metric
- Stop testing Python 3.7
:tag:`1.0.0 <0.1.0...1.0.0>` (20-Jul-2021) :tag:`1.0.0 <0.1.0...1.0.0>` (20-Jul-2021)
------------------------------------------ ------------------------------------------

View file

@ -23,6 +23,7 @@ classifiers =
Programming Language :: Python :: 3.7 Programming Language :: Python :: 3.7
Programming Language :: Python :: 3.9 Programming Language :: Python :: 3.9
Programming Language :: Python :: 3.10 Programming Language :: Python :: 3.10
Programming Language :: Python :: 3.11
Topic :: Communications Topic :: Communications
Topic :: Internet Topic :: Internet
Topic :: Software Development Topic :: Software Development
@ -36,7 +37,6 @@ install_requires =
tornado = tornado =
tornado>=5 tornado>=5
dev = dev =
asynctest==0.13.0
coverage==5.5 coverage==5.5
flake8==3.9.2 flake8==3.9.2
flake8-import-order==0.18.1 flake8-import-order==0.18.1

View file

@ -6,23 +6,16 @@ import time
import typing import typing
import unittest.mock import unittest.mock
import asynctest
from sprockets_statsd import statsd from sprockets_statsd import statsd
from tests import helpers from tests import helpers
class ProcessorTestCase(asynctest.TestCase): class ProcessorTestCase(unittest.IsolatedAsyncioTestCase):
ip_protocol: int ip_protocol: int
async def setUp(self): def setUp(self):
self.test_timeout = 5.0 self.test_timeout = 5.0
super().setUp() super().setUp()
await self.asyncSetUp()
async def tearDown(self):
await self.asyncTearDown()
super().tearDown()
async def wait_for(self, fut): async def wait_for(self, fut):
try: try:
@ -31,6 +24,7 @@ class ProcessorTestCase(asynctest.TestCase):
self.fail('future took too long to resolve') self.fail('future took too long to resolve')
async def asyncSetUp(self): async def asyncSetUp(self):
await super().asyncSetUp()
self.statsd_server = helpers.StatsdServer(self.ip_protocol) self.statsd_server = helpers.StatsdServer(self.ip_protocol)
self.statsd_task = asyncio.create_task(self.statsd_server.run()) self.statsd_task = asyncio.create_task(self.statsd_server.run())
await self.statsd_server.wait_running() await self.statsd_server.wait_running()
@ -38,6 +32,7 @@ class ProcessorTestCase(asynctest.TestCase):
async def asyncTearDown(self): async def asyncTearDown(self):
self.statsd_server.close() self.statsd_server.close()
await self.statsd_server.wait_closed() await self.statsd_server.wait_closed()
await super().asyncTearDown()
class ProcessorTests(ProcessorTestCase): class ProcessorTests(ProcessorTestCase):

View file

@ -1,5 +1,5 @@
[tox] [tox]
envlist = lint,distcheck,py37,py38,py39,tornado5 envlist = lint,distcheck,py38,py39,py311,tornado5
toxworkdir = ./build/tox toxworkdir = ./build/tox
[testenv] [testenv]