Skip to content

Commit 9e8fbfd

Browse files
committed
Add tests with different pytest versions
- change first supported pytest version to 3.0 (older version do not work anymore)
1 parent d81cd56 commit 9e8fbfd

File tree

4 files changed

+33
-7
lines changed

4 files changed

+33
-7
lines changed

.github/workflows/pythonpackage.yml

Lines changed: 28 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -104,11 +104,6 @@ jobs:
104104
run: |
105105
python -m pyfakefs.tests.all_tests
106106
shell: bash
107-
- name: Run pytest tests
108-
run: |
109-
export PY_VERSION=${{ matrix.python-version }}
110-
$GITHUB_WORKSPACE/.github/workflows/run_pytest.sh
111-
shell: bash
112107
- name: Run performance tests
113108
run: |
114109
if [[ '${{ matrix.os }}' != 'macOS-latest' ]]; then
@@ -117,6 +112,34 @@ jobs:
117112
fi
118113
shell: bash
119114

115+
pytest-test:
116+
runs-on: ${{ matrix.os }}
117+
strategy:
118+
fail-fast: false
119+
matrix:
120+
os: [ubuntu-latest, windows-2016]
121+
python-version: [3.9]
122+
pytest-version: [3.0.0, 3.5.1, 4.0.2, 4.5.0, 5.0.1, 5.4.3, 6.0.2, 6.2.5, 7.0.1, 7.1.0]
123+
steps:
124+
- uses: actions/checkout@v2
125+
- name: Set up Python ${{ matrix.python-version }}
126+
uses: actions/setup-python@v2
127+
with:
128+
python-version: ${{ matrix.python-version }}
129+
- name: Install dependencies
130+
run: |
131+
pip install -r requirements.txt
132+
pip install -U pytest==${{ matrix.pytest-version }}
133+
if [[ '${{ matrix.pytest-version }}' == '4.0.2' ]]; then
134+
pip install -U attrs==19.1.0
135+
fi
136+
shell: bash
137+
- name: Run pytest tests
138+
run: |
139+
export PY_VERSION=${{ matrix.python-version }}
140+
$GITHUB_WORKSPACE/.github/workflows/run_pytest.sh
141+
shell: bash
142+
120143
dependency-check:
121144
runs-on: ${{ matrix.os }}
122145
strategy:

CHANGES.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,9 @@ The released versions correspond to PyPi releases.
77
* only skip `_pytest.pathlib` in pytest versions where it is actually present
88
(see [#669](../../issues/669))
99

10+
### Infrastructure
11+
* add tests with different pytest versions
12+
1013
## [Version 4.5.5](https://pypi.python.org/pypi/pyfakefs/4.5.5) (2022-02-14)
1114
Bugfix release, needed for compatibility with pytest 7.0.
1215

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ using convenience functions.
4646
pyfakefs works with CPython 3.6 and above, on Linux, Windows and OSX
4747
(MacOS), and with PyPy3.
4848

49-
pyfakefs works with [PyTest](http://doc.pytest.org) version 2.8.6 or above.
49+
pyfakefs works with [PyTest](http://doc.pytest.org) version 3.0.0 or above.
5050

5151
pyfakefs will not work with Python libraries that use C libraries to access the
5252
file system. This is because pyfakefs cannot patch the underlying C libraries'

docs/intro.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ The software under test requires no modification to work with pyfakefs.
99
pyfakefs works with CPython 3.6 and above, on Linux, Windows and OSX
1010
(MacOS), and with PyPy3.
1111

12-
pyfakefs works with `PyTest <doc.pytest.org>`__ version 2.8.6 or above.
12+
pyfakefs works with `PyTest <doc.pytest.org>`__ version 3.0.0 or above.
1313

1414
Installation
1515
------------

0 commit comments

Comments
 (0)