Skip to content

Commit cd8c9b4

Browse files
authored
Merge pull request #190 from LUMC/pytest8.0
Add 3.12 python support, drop 3.7 support
2 parents e8d5df9 + 40857b2 commit cd8c9b4

File tree

5 files changed

+21
-20
lines changed

5 files changed

+21
-20
lines changed

.github/workflows/ci.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ jobs:
1414
strategy:
1515
matrix:
1616
python-version:
17-
- "3.7"
17+
- "3.8"
1818
steps:
1919
- uses: actions/checkout@v2.3.4
2020
- name: Set up Python ${{ matrix.python-version }}
@@ -42,11 +42,11 @@ jobs:
4242
strategy:
4343
matrix:
4444
python-version:
45-
- "3.7"
4645
- "3.8"
4746
- "3.9"
4847
- "3.10"
4948
- "3.11"
49+
- "3.12"
5050
steps:
5151
- uses: actions/checkout@v2.3.4
5252
- name: Set up Python ${{ matrix.python-version }}
@@ -64,7 +64,7 @@ jobs:
6464
runs-on: ubuntu-latest
6565
strategy:
6666
matrix:
67-
python-version: ["3.7"]
67+
python-version: ["3.11"]
6868
test-program: [snakemake, miniwdl]
6969
steps:
7070
- uses: actions/checkout@v2.3.4

HISTORY.rst

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2,11 +2,6 @@
22
Changelog
33
==========
44

5-
version 2.0.2
6-
---------------------------
7-
+ Fixed a bug where pytest 8.1+ would raise a ``PluginValidationError`` because
8-
the hook ``pytest_collect_file()`` has finally dropped the deprecated
9-
argument ``path`` from its specification.
105

116
.. Newest changes should be on top.
127
@@ -15,6 +10,11 @@ version 2.0.2
1510
1611
version 2.1.0-dev
1712
---------------------------
13+
+ Python version 3.7 support is dropped because it is deprecated. Python
14+
version 3.12 was added.
15+
+ Fixed a bug where pytest 8.1+ would raise a ``PluginValidationError`` because
16+
the hook ``pytest_collect_file()`` has finally dropped the deprecated
17+
argument ``path`` from its specification.
1818
+ Add extract_md5sum check on uncompressed contents of compressed output files.
1919
Gzipped files contain a timestamp which makes it hard to directly compare the
2020
md5sums of gzipped files.

setup.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -39,18 +39,18 @@
3939
classifiers=[
4040
"Programming Language :: Python :: 3 :: Only",
4141
"Programming Language :: Python :: 3",
42-
"Programming Language :: Python :: 3.7",
4342
"Programming Language :: Python :: 3.8",
4443
"Programming Language :: Python :: 3.9",
4544
"Programming Language :: Python :: 3.10",
4645
"Programming Language :: Python :: 3.11",
46+
"Programming Language :: Python :: 3.12",
4747
"Development Status :: 5 - Production/Stable",
4848
"License :: OSI Approved :: "
4949
"GNU Affero General Public License v3 or later (AGPLv3+)",
5050
"Framework :: Pytest",
5151
],
52-
# Because we cannot test anymore on Python 3.6.
53-
python_requires=">=3.7",
52+
# Because we cannot test anymore on Python 3.8.
53+
python_requires=">=3.8",
5454
install_requires=[
5555
"pytest>=7.0.0", # To use pathlib Path's in pytest
5656
"pyyaml",

src/pytest_workflow/plugin.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -121,7 +121,8 @@ def pytest_collect_file(file_path, parent):
121121
"""Collection hook
122122
This collects the yaml files that start with "test" and end with
123123
.yaml or .yml"""
124-
if file_path.suffix in [".yml", ".yaml"] and file_path.name.startswith("test"):
124+
if (file_path.suffix in [".yml", ".yaml"] and
125+
file_path.name.startswith("test")):
125126
return YamlFile.from_parent(parent, path=file_path)
126127
return None
127128

tests/functional/simple_snakefile_test_cases.yml

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,26 +1,26 @@
11
- name: test-dry-run
2-
command: snakemake -n -r -p -s SimpleSnakefile --config N_LINES_TO_READ=1
2+
command: snakemake -n -p -s SimpleSnakefile --config N_LINES_TO_READ=1
33
- name: test-config-missing
4-
command: snakemake -n -r -p -s SimpleSnakefile
4+
command: snakemake -n -p -s SimpleSnakefile
55
exit_code: 1
6-
stdout:
6+
stderr:
77
contains:
88
- "You must set --config N_LINES_TO_READ=<a value>."
99
- name: test-config-wrong-type
10-
command: snakemake -n -r -p -s SimpleSnakefile --config N_LINES_TO_READ=one
10+
command: snakemake -n -p -s SimpleSnakefile --config N_LINES_TO_READ=one
1111
exit_code: 1
12-
stdout:
12+
stderr:
1313
contains:
1414
- "N_LINES_TO_READ must be an integer."
1515
- name: test-config-invalid-value
16-
command: snakemake -n -r -p -s SimpleSnakefile --config N_LINES_TO_READ=-1
16+
command: snakemake -n -p -s SimpleSnakefile --config N_LINES_TO_READ=-1
1717
exit_code: 1
18-
stdout:
18+
stderr:
1919
contains:
2020
- "N_LINES_TO_READ must at least be 1."
2121
- name: test-snakemake-run
2222
command: >-
23-
snakemake --cores 1 -r -p -s SimpleSnakefile --config N_LINES_TO_READ=500
23+
snakemake --cores 1 -p -s SimpleSnakefile --config N_LINES_TO_READ=500
2424
files:
2525
- path: rand/0.txt
2626
- path: rand/1.txt

0 commit comments

Comments
 (0)