mirror of
https://github.com/sprockets/sprockets-statsd.git
synced 2024-11-23 11:19:53 +00:00
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:
parent
a63733dcad
commit
b64cd0cbde
5 changed files with 8 additions and 12 deletions
2
.github/workflows/run-tests.yml
vendored
2
.github/workflows/run-tests.yml
vendored
|
@ -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 }}
|
||||||
|
|
|
@ -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)
|
||||||
------------------------------------------
|
------------------------------------------
|
||||||
|
|
|
@ -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
|
||||||
|
|
|
@ -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):
|
||||||
|
|
2
tox.ini
2
tox.ini
|
@ -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]
|
||||||
|
|
Loading…
Reference in a new issue