1
0
Fork 0
mirror of https://git.freebsd.org/ports.git synced 2025-06-19 03:30:32 -04:00
ports/devel/py-pytest4/files/patch-testing-test_parseopt.py
Dmitry Marakasov 7db0553499 devel/py-pytest4: preserve 4.x version of devel/py-pytest
- Preserve 4.x version of pytest for the ports which are not
  compatible with pytest 6.x. This is a prerequisite for updating
  pytest.

PR:		256624
Approved by:	maintainer timeout (python@, many months)
2022-03-18 20:11:37 +03:00

11 lines
706 B
Python

--- testing/test_parseopt.py.orig 2020-06-05 12:09:03 UTC
+++ testing/test_parseopt.py
@@ -305,7 +305,7 @@ def test_argcomplete(testdir, monkeypatch):
# redirect output from argcomplete to stdin and stderr is not trivial
# http://stackoverflow.com/q/12589419/1307905
# so we use bash
- fp.write('COMP_WORDBREAKS="$COMP_WORDBREAKS" python -m pytest 8>&1 9>&2')
+ fp.write('COMP_WORDBREAKS="$COMP_WORDBREAKS" %%PYTHON_CMD%% -m pytest 8>&1 9>&2')
# alternative would be exteneded Testdir.{run(),_run(),popen()} to be able
# to handle a keyword argument env that replaces os.environ in popen or
# extends the copy, advantage: could not forget to restore