New issue 434: Standalone test script should allow custom interpreter in shebang https://bitbucket.org/hpk42/pytest/issue/434/standalone-test-script-should-allow-custom
Nikolaus Rath: It seems that standalone tests scripts always get a "python" shebang: ``` $ py.test-3.3 --version This is py.test version 2.5.1, imported from /home/nikratio/.local/lib/python3.3/site-packages/pytest.py $ py.test-3.3 --genscript test.py WARNING: generated script will not run on python2.6 or below due to 'argparse' dependency. Use python2.6 to generate a python2.5/6 compatible script $ head -2 test.py #! /usr/bin/env python ``` This is rather annoying if the tested module only works under Python 3.x, because users have to be instructed to explicitly call `python3 test.py`. It would be nice if there was an option to specify the interpreter used in the shebang. Maybe it should even default to the interpreter that was used when generating the test script? _______________________________________________ pytest-commit mailing list pytest-commit@python.org https://mail.python.org/mailman/listinfo/pytest-commit