Skip to content

Commit 2347b8b

Browse files
committed
Deprecate and warn about --genscript, fixes pytest-dev#730
1 parent 023687d commit 2347b8b

File tree

4 files changed

+6
-3
lines changed

4 files changed

+6
-3
lines changed

CHANGELOG

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
2.8.0.dev (compared to 2.7.X)
22
-----------------------------
3+
- deprecate and warn about the --genscript option
34

45
- fix issue82: avoid loading conftest files from setup.cfg/pytest.ini/tox.ini
56
files and upwards by default (--confcutdir can still be set to override this).

_pytest/genscript.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
""" generate a single-file self-contained version of pytest """
1+
""" (deprecated) generate a single-file self-contained version of pytest """
22
import os
33
import sys
44
import pkgutil
@@ -72,6 +72,8 @@ def pytest_cmdline_main(config):
7272
genscript = config.getvalue("genscript")
7373
if genscript:
7474
tw = _pytest.config.create_terminal_writer(config)
75+
tw.line("WARNING: usage of genscript is deprecated.",
76+
red=True)
7577
deps = ['py', 'pluggy', '_pytest', 'pytest']
7678
if sys.version_info < (2,7):
7779
deps.append("argparse")

doc/en/goodpractises.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -154,7 +154,7 @@ to create a JUnitXML file that Jenkins_ can pick up and generate reports.
154154
.. _standalone:
155155
.. _`genscript method`:
156156

157-
Create a pytest standalone script
157+
(deprecated) Create a pytest standalone script
158158
-------------------------------------------
159159

160160
If you are a maintainer or application developer and want people

doc/en/test/plugin/genscript.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11

2-
generate standalone test script to be distributed along with an application.
2+
(deprecated) generate standalone test script to be distributed along with an application.
33
============================================================================
44

55

0 commit comments

Comments
 (0)