Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Python 3.12 #485

Merged
merged 4 commits into from
Oct 27, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 2 additions & 7 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ jobs:
strategy:
matrix:
os: [ubuntu-latest]
python-version: [3.7, 3.8, 3.9, "3.10", 3.11]
python-version: [3.7, 3.8, 3.9, "3.10", 3.11, 3.12]
env:
MOLER_DEBUG_THREADS: True
steps:
Expand Down Expand Up @@ -47,13 +47,8 @@ jobs:
which adb
echo ----------- test adb simulator
adb devices
- name: Test with pytest Python 2.7
if: ${{ matrix.python-version == '2.7' }}
timeout-minutes: 9
run: |
python -m pytest -vvvsss test/
- name: Test with pytest
if: ${{ (matrix.python-version != '3.9') && (matrix.python-version != '2.7') }}
if: ${{ matrix.python-version != '3.9' }}
timeout-minutes: 9
run: |
python -m pytest -vvvsss test/
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
[![image](https://img.shields.io/badge/pypi-v2.15.0-blue.svg)](https://pypi.org/project/moler/)
[![image](https://img.shields.io/badge/python-2.7%20%7C%203.6%20%7C%203.7%20%7C%203.8%20%7C%203.9%20%7C%203.10%20%7C%203.11-blue.svg)](https://pypi.org/project/moler/)
[![image](https://img.shields.io/badge/python-2.7%20%7C%203.6%20%7C%203.7%20%7C%203.8%20%7C%203.9%20%7C%203.10%20%7C%203.11%20%7C%203.12-blue.svg)](https://pypi.org/project/moler/)
[![Build Status](https://travis-ci.org/nokia/moler.svg?branch=master)](https://travis-ci.org/nokia/moler)
[![Coverage Status](https://coveralls.io/repos/github/nokia/moler/badge.svg?branch=master)](https://coveralls.io/github/nokia/moler?branch=master)
[![BCH compliance](https://bettercodehub.com/edge/badge/nokia/moler?branch=master)](https://bettercodehub.com/)
Expand Down
2 changes: 2 additions & 0 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,8 @@
'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',
Expand Down
8 changes: 5 additions & 3 deletions test/test_connection_observer.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# -*- coding: utf-8 -*-

__author__ = 'Grzegorz Latuszek, Marcin Usielski'
__copyright__ = 'Copyright (C) 2018-2021, Nokia'
__copyright__ = 'Copyright (C) 2018-2023, Nokia'
__email__ = '[email protected], [email protected]'

import importlib
Expand Down Expand Up @@ -378,8 +378,10 @@ def test_connection_observer_has_data_received_api(connection_observer_major_bas
# only derived ones can have logic "what to do with incoming data"
with pytest.raises(TypeError) as error:
hasattr(connection_observer_class(), "data_received")
assert "Can't instantiate abstract class {} with abstract method".format(
connection_observer_class.__name__) in str(error.value)
assert "Can't instantiate abstract class {} with abstract method".format( # <3.12
connection_observer_class.__name__) in str(error.value) or\
"Can't instantiate abstract class {} without an implementation for abstract method".format(
connection_observer_class.__name__) in str(error.value) # 3.12
assert "data_received" in str(error.value)

# example of derived connection_observer implementing it's "data consumption logic"
Expand Down
Loading