Skip to content

Commit d01fa82

Browse files
committed
Update fixture creation to handle pytest 8.4.0, and update supported python versions
1 parent aa09fc3 commit d01fa82

File tree

5 files changed

+14
-10
lines changed

5 files changed

+14
-10
lines changed

.github/workflows/build.yaml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ jobs:
1010
runs-on: ubuntu-22.04
1111
strategy:
1212
matrix:
13-
python-version: ["3.7", "3.8", "3.9", "3.10", "3.11"]
13+
python-version: ["3.9", "3.10", "3.11", "3.12", "3.13"]
1414

1515
steps:
1616
- uses: actions/checkout@v3
@@ -27,7 +27,7 @@ jobs:
2727
2828
- name: Test using tox
2929
run: |
30-
tox -s -e "py37,py38,py39,py310,py311"
30+
tox -s -e "py39,py310,py311,py312,py313"
3131
3232
# - name: Test Summary
3333
# uses: test-summary/action@v1
@@ -45,7 +45,7 @@ jobs:
4545
- name: Set up Python ${{ matrix.python-version }}
4646
uses: actions/setup-python@v4
4747
with:
48-
python-version: "3.11"
48+
python-version: "3.13"
4949

5050
- name: Install dependencies
5151
run: |

Dockerfile

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
1-
FROM fedora:34 AS base
1+
FROM fedora:42 AS base
22

33
RUN dnf -y update && dnf clean all
4-
RUN dnf -y install python3.7 python3.8 python3.9 python3.10 python3.11 tox git && dnf clean all
4+
RUN dnf -y install python3.9 python3.10 python3.11 python3.12 python3.13 tox git && dnf clean all
55
RUN python3 -m pip install --upgrade build twine mkdocs && dnf clean all
66

77
FROM base AS build
@@ -30,4 +30,4 @@ FROM build AS build_package
3030
RUN python3 -m build && twine check dist/*
3131

3232
FROM scratch AS package
33-
COPY --from=build_package /src/dist/ /
33+
COPY --from=build_package /src/dist/ /

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ Features
2323
Requirements
2424
------------
2525

26-
* Requires python3 >= 3.6, pexpect, pyeapi
26+
* Requires python3 >= 3.9, pexpect, pyeapi
2727
* Network devices under test (DUTs) must be accessible via SSH.
2828

2929

@@ -248,4 +248,4 @@ Distributed under the terms of the [BSD-3](http://opensource.org/licenses/BSD-3-
248248
Issues
249249
------
250250

251-
If you encounter any problems, please [file an issue](https://github.com/dcasnowdon-anet/pytest-netdut/issues) along with a detailed description.
251+
If you encounter any problems, please [file an issue](https://github.com/aristanetworks/pytest-netdut/issues) along with a detailed description.

src/pytest_netdut/__init__.py

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -153,7 +153,11 @@ def create(name) -> Callable:
153153
]
154154

155155
for fixture in fixtures:
156-
globals()[fixture._pytestfixturefunction.name] = fixture
156+
try:
157+
globals()[fixture.name] = fixture
158+
except AttributeError:
159+
# For pytest < 8.4.0
160+
globals()[fixture._pytestfixturefunction.name] = fixture
157161

158162
return fixtures[0]
159163

tox.ini

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
# For more information about tox, see https://tox.readthedocs.io/en/latest/
22
[tox]
33
isolated_build = True
4-
envlist = py37,py38,py39,py310,py311,black,prospector,tmpblack
4+
envlist = py39,py310,py311,py312,py313,black,prospector,tmpblack
55

66
[testenv]
77
deps =

0 commit comments

Comments
 (0)