Skip to content

Commit

Permalink
Deprecate and warn about --genscript, fixes pytest-dev#730
Browse files Browse the repository at this point in the history
  • Loading branch information
cpommranz committed Jul 25, 2015
1 parent 80ee620 commit 57c6ffd
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 3 deletions.
1 change: 1 addition & 0 deletions CHANGELOG
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
2.8.0.dev (compared to 2.7.X)
-----------------------------
- deprecate and warn about the --genscript option

- fix issue82: avoid loading conftest files from setup.cfg/pytest.ini/tox.ini
files and upwards by default (--confcutdir can still be set to override this).
Expand Down
4 changes: 3 additions & 1 deletion _pytest/genscript.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
""" generate a single-file self-contained version of pytest """
""" (deprecated) generate a single-file self-contained version of pytest """
import os
import sys
import pkgutil
Expand Down Expand Up @@ -72,6 +72,8 @@ def pytest_cmdline_main(config):
genscript = config.getvalue("genscript")
if genscript:
tw = _pytest.config.create_terminal_writer(config)
tw.line("WARNING: usage of genscript is deprecated.",
red=True)
deps = ['py', 'pluggy', '_pytest', 'pytest']
if sys.version_info < (2,7):
deps.append("argparse")
Expand Down
2 changes: 1 addition & 1 deletion doc/en/goodpractises.txt
Original file line number Diff line number Diff line change
Expand Up @@ -154,7 +154,7 @@ to create a JUnitXML file that Jenkins_ can pick up and generate reports.
.. _standalone:
.. _`genscript method`:

Create a pytest standalone script
(deprecated) Create a pytest standalone script
-------------------------------------------

If you are a maintainer or application developer and want people
Expand Down
2 changes: 1 addition & 1 deletion doc/en/test/plugin/genscript.txt
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@

generate standalone test script to be distributed along with an application.
(deprecated) generate standalone test script to be distributed along with an application.
============================================================================


Expand Down

0 comments on commit 57c6ffd

Please sign in to comment.