[py-dev] Problems with DOS files
Florian Schulze
florian.proff.schulze at gmx.net
Wed Jan 19 12:19:56 CET 2005
On Tue, 18 Jan 2005 23:19:24 +0100, 'holger krekel' <hpk at trillke.net>
wrote:
> Hi Matthew,
>
> On Mon, Jan 17, 2005 at 19:00 -0600, Matthew Scott wrote:
>> Patrick K. O'Brien wrote:
>> >>Is there
>> >>anything similarly simple that can be done under windows?
>> >
>> >
>> >Not that I'm aware of. :-(
>> >
>> >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
>>
>> Just had to do something similar with a Schevo script, so here's a new
>> version that can be put into py\bin as pytest.cmd:
>>
>> @echo off
>> python %~dp0\py.test %*
>
> much nicer! Now if only the thing could be named "py<dot>test" :-)
I put a py.test.bat into my C:\Python23\Scripts directory and added that
to my path. Now I can just use it by typing "py.test ...". So where is the
problem? Does it really need to be called py.test? You could write two
files, one names py.test for unix and one py.test.bat/py.test.cmd and just
install both into a directory which is in the path. Then it works the same
on both unix and windows.
Regards,
Florian Schulze
More information about the Pytest-dev
mailing list