fix protocol unit test for python3.12 (#148)

* fix protocol unit test for python3.12

* add workflow test for python 3.12
This commit is contained in:
Nigel Dokter 2024-01-29 14:25:39 +01:00 committed by GitHub
parent 739419e3ee
commit 1680cacf49
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
3 changed files with 3 additions and 1 deletions

View File

@ -17,6 +17,7 @@ jobs:
- '3.9' - '3.9'
- '3.10' - '3.10'
- '3.11' - '3.11'
- '3.12'
name: Python ${{ matrix.python-version }} name: Python ${{ matrix.python-version }}
steps: steps:

View File

@ -68,6 +68,6 @@ class ProtocolTest(unittest.TestCase):
# 2nd call of keep_alive should close the transport # 2nd call of keep_alive should close the transport
self.protocol.keep_alive() self.protocol.keep_alive()
assert mock_transport.close.called_once() mock_transport.close.assert_called_once()
self.protocol.connection_lost(None) self.protocol.connection_lost(None)

View File

@ -6,6 +6,7 @@ deps=
pytest-asyncio pytest-asyncio
pytest-mock pytest-mock
dlms_cosem dlms_cosem
setuptools
commands= commands=
py.test --cov=dsmr_parser test {posargs} py.test --cov=dsmr_parser test {posargs}
pylama dsmr_parser test pylama dsmr_parser test