Skip to content

Commit

Permalink
feat: supress warnings in tests, use python3.12
Browse files Browse the repository at this point in the history
  • Loading branch information
NikitaZotov committed Oct 16, 2024
1 parent d24ce1c commit 62fb3f1
Show file tree
Hide file tree
Showing 5 changed files with 11 additions and 5 deletions.
7 changes: 4 additions & 3 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,10 @@ jobs:
fail-fast: false
matrix:
include:
- { name: Linux, python: '3.10', os: ubuntu-latest, tox: py310 }
- { name: Windows, python: '3.10', os: windows-latest, tox: py310 }
- { name: Mac, python: '3.10', os: macos-latest, tox: py310 }
- { name: Linux, python: '3.12', os: ubuntu-latest, tox: py312 }
- { name: Windows, python: '3.12', os: windows-latest, tox: py312 }
- { name: Mac, python: '3.12', os: macos-latest, tox: py312 }
- { name: '3.12', python: '3.12', os: ubuntu-latest, tox: py312 }
- { name: '3.11', python: '3.11', os: ubuntu-latest, tox: py311 }
- { name: '3.9', python: '3.9', os: ubuntu-latest, tox: py39 }
- { name: '3.8', python: '3.8', os: ubuntu-latest, tox: py38 }
Expand Down
1 change: 1 addition & 0 deletions setup.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ where = src
testpaths = tests
filterwarnings =
error
ignore:.*deprecated:DeprecationWarning

[coverage:run]
branch = True
Expand Down
2 changes: 2 additions & 0 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,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",
],
keywords="sc-client, sc client",
packages=find_packages(where="src", exclude=("tests",)),
Expand Down
2 changes: 2 additions & 0 deletions tests/deprecated_models_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -137,6 +137,7 @@ def test_is_node(self):
for sc_type in self.types.difference(node_types):
assert sc_type.is_node() is False

@pytest.mark.filterwarnings("ignore::DeprecationWarning")
def test_is_edge(self):
edge_types = {
t.EDGE_U_COMMON,
Expand Down Expand Up @@ -296,6 +297,7 @@ def test_is_tuple(self):
for sc_type in self.types.difference(tuple_types):
assert sc_type.is_tuple() is False

@pytest.mark.filterwarnings("ignore::DeprecationWarning")
def test_is_struct(self):
struct_types = {t.NODE_STRUCT, t.NODE_CONST_STRUCT, t.NODE_VAR_STRUCT}
for sc_type in struct_types:
Expand Down
4 changes: 2 additions & 2 deletions tox.ini
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
[tox]
envlist = py3{11,10,9,8}
envlist = py3{12,11,10,9,8}
skip_missing_interpreters = true

[testenv]
deps = -rrequirements-dev.txt
whitelist_externals = python
commands =
python -m pytest tests
python -m pytest tests -W ignore::DeprecationWarning

0 comments on commit 62fb3f1

Please sign in to comment.