[py-dev] Problems with DOS files

Brian Dorsey briandorsey at gmail.com
Fri Dec 3 00:58:12 CET 2004


On Thu, 2 Dec 2004 15:40:09 -0600, Patrick K. O'Brien
<pobrien at eclypse.org> wrote:

> Take that back.  Courtesy of Matthew Scott, here is a clever, two-line
> solution (concatenate that second line if it breaks):
>
> pytest.bat
> ==========
> @echo off
> python -c "import py; from py.__impl__.test.cmdline import main; main()" %1
> %2 %3 %4 %5 %6 %7 %8 %9


I think something along these lines is a good general solution for
windows users. A distutils installer could also copy this to the
pythonXX\scripts directory.

Personally, though... I find it convenient to have the .py extension
associated with Python, so in this case, I'm a bit tempted to just
copy py.test to the rather oddly named py.test.py.

When I do that on my machine, it seems to work, though it doesn't
really feel right somehow:
C:\Data\BrianDocuments\home\local\py\py\bin>py.test.py ..\test
inserting into sys.path: C:\Data\BrianDocuments\home\local\py
============================= test process starts =============================
testing-mode: inprocess
executable  : C:\Python23\python.exe  (2.3.4-final-0)
===============================================================================
..............................................
================== tests finished: 46 passed in 1.28 seconds ==================

Take care,
-Brian



More information about the Pytest-dev mailing list