File tree Expand file tree Collapse file tree 2 files changed +10
-11
lines changed Expand file tree Collapse file tree 2 files changed +10
-11
lines changed Original file line number Diff line number Diff line change 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."""
53import shutil
64import subprocess
75import textwrap
86
97import 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 }])
Original file line number Diff line number Diff 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
489489Here is a stripped down real-life example of using parametrized
490490testing 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
515515If you want to compare the outcomes of several implementations of a given
516516API, you can write test functions that receive the already imported implementations
You can’t perform that action at this time.
0 commit comments