Skip to content

Commit 62c8ca5

Browse files
Merge branch 'main' into Feature-consider-nonparametrized-tests-in-reordering
2 parents b868b76 + f2b6040 commit 62c8ca5

File tree

3 files changed

+10
-12
lines changed

3 files changed

+10
-12
lines changed

doc/en/example/multipython.py

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,13 @@
1-
"""
2-
module containing a parametrized tests testing cross-python
3-
serialization via the pickle module.
4-
"""
1+
"""Module containing a parametrized tests testing cross-python serialization
2+
via the pickle module."""
53
import shutil
64
import subprocess
75
import textwrap
86

97
import pytest
108

11-
pythonlist = ["python3.5", "python3.6", "python3.7"]
9+
10+
pythonlist = ["python3.9", "python3.10", "python3.11"]
1211

1312

1413
@pytest.fixture(params=pythonlist)
@@ -43,7 +42,7 @@ def dumps(self, obj):
4342
)
4443
)
4544
)
46-
subprocess.check_call((self.pythonpath, str(dumpfile)))
45+
subprocess.run((self.pythonpath, str(dumpfile)), check=True)
4746

4847
def load_and_is_true(self, expression):
4948
loadfile = self.picklefile.with_name("load.py")
@@ -63,7 +62,7 @@ def load_and_is_true(self, expression):
6362
)
6463
)
6564
print(loadfile)
66-
subprocess.check_call((self.pythonpath, str(loadfile)))
65+
subprocess.run((self.pythonpath, str(loadfile)), check=True)
6766

6867

6968
@pytest.mark.parametrize("obj", [42, {}, {1: 3}])

doc/en/example/parametrize.rst

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -483,8 +483,8 @@ argument sets to use for each test function. Let's run it:
483483
FAILED test_parametrize.py::TestClass::test_equals[1-2] - assert 1 == 2
484484
1 failed, 2 passed in 0.12s
485485
486-
Indirect parametrization with multiple fixtures
487-
--------------------------------------------------------------
486+
Parametrization with multiple fixtures
487+
--------------------------------------
488488

489489
Here is a stripped down real-life example of using parametrized
490490
testing for testing serialization of objects between different python
@@ -509,8 +509,8 @@ Running it results in some skips if we don't have all the python interpreters in
509509
SKIPPED [9] multipython.py:69: 'python3.7' not found
510510
27 skipped in 0.12s
511511
512-
Indirect parametrization of optional implementations/imports
513-
--------------------------------------------------------------------
512+
Parametrization of optional implementations/imports
513+
---------------------------------------------------
514514

515515
If you want to compare the outcomes of several implementations of a given
516516
API, you can write test functions that receive the already imported implementations

doc/en/index.rst

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@
22

33
.. sidebar:: Next Open Trainings
44

5-
- `pytest tips and tricks for a better testsuite <https://ep2023.europython.eu/session/pytest-tips-and-tricks-for-a-better-testsuite>`_, at `Europython 2023 <https://ep2023.europython.eu/>`_, **July 18th** (3h), **Prague, Czech Republic / Remote**
65
- `pytest: Professionelles Testen (nicht nur) für Python <https://workshoptage.ch/workshops/2023/pytest-professionelles-testen-nicht-nur-fuer-python-2/>`_, at `Workshoptage 2023 <https://workshoptage.ch/>`_, **September 5th**, `OST <https://www.ost.ch/en>`_ Campus **Rapperswil, Switzerland**
76
- `Professional Testing with Python <https://python-academy.com/courses/python_course_testing.html>`_, via `Python Academy <https://www.python-academy.com/>`_, **March 5th to 7th 2024** (3 day in-depth training), **Leipzig, Germany / Remote**
87

0 commit comments

Comments
 (0)